[INFO] cloning repository https://github.com/itsFM-Codes/clint [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/itsFM-Codes/clint" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FitsFM-Codes%2Fclint", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FitsFM-Codes%2Fclint'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 873863399b988ed9cac38664b7084484c61eead3 [INFO] linting itsFM-Codes/clint against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FitsFM-Codes%2Fclint" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/itsFM-Codes/clint [INFO] finished tweaking git repo https://github.com/itsFM-Codes/clint [INFO] tweaked toml for git repo https://github.com/itsFM-Codes/clint written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/itsFM-Codes/clint on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/itsFM-Codes/clint already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 3fd45bca2735d86cefa36f2074d5dca8f65fe5793f3ecd957b4a23f6e8022120 [INFO] running `Command { std: "docker" "start" "-a" "3fd45bca2735d86cefa36f2074d5dca8f65fe5793f3ecd957b4a23f6e8022120", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "3fd45bca2735d86cefa36f2074d5dca8f65fe5793f3ecd957b4a23f6e8022120", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3fd45bca2735d86cefa36f2074d5dca8f65fe5793f3ecd957b4a23f6e8022120", kill_on_drop: false }` [INFO] [stdout] 3fd45bca2735d86cefa36f2074d5dca8f65fe5793f3ecd957b4a23f6e8022120 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 41b7f91657210895245489eecf9198255ba902796757f85472b90ae7abff885c [INFO] running `Command { std: "docker" "start" "-a" "41b7f91657210895245489eecf9198255ba902796757f85472b90ae7abff885c", kill_on_drop: false }` [INFO] [stderr] Compiling quote v1.0.44 [INFO] [stderr] Compiling serde_core v1.0.228 [INFO] [stderr] Checking toml_write v0.1.2 [INFO] [stderr] Checking winnow v0.7.14 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking bstr v1.12.1 [INFO] [stderr] Checking colored v2.2.0 [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking globset v0.4.18 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling clap_derive v4.5.55 [INFO] [stderr] Checking clap v4.5.60 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking serde_spanned v0.6.9 [INFO] [stderr] Checking toml_datetime v0.6.11 [INFO] [stderr] Checking toml_edit v0.22.27 [INFO] [stderr] Checking toml v0.8.23 [INFO] [stderr] Checking clint v1.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | / impl Default for Config { [INFO] [stdout] 83 | | fn default() -> Self { [INFO] [stdout] 84 | | Self { [INFO] [stdout] 85 | | general: GeneralConfig::default(), [INFO] [stdout] ... | [INFO] [stdout] 92 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub struct Config { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | / impl Default for Config { [INFO] [stdout] 83 | | fn default() -> Self { [INFO] [stdout] 84 | | Self { [INFO] [stdout] 85 | | general: GeneralConfig::default(), [INFO] [stdout] ... | [INFO] [stdout] 92 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub struct Config { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/rules/style.rs:131:25 [INFO] [stdout] | [INFO] [stdout] 131 | / if leading.contains('\t') { [INFO] [stdout] 132 | | diagnostics.push(Diagnostic::new( [INFO] [stdout] 133 | | path, [INFO] [stdout] 134 | | line_num, [INFO] [stdout] ... | [INFO] [stdout] 140 | | )); [INFO] [stdout] 141 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 130 ~ "spaces" [INFO] [stdout] 131 ~ if leading.contains('\t') => { [INFO] [stdout] 132 | diagnostics.push(Diagnostic::new( [INFO] [stdout] ... [INFO] [stdout] 140 | )); [INFO] [stdout] 141 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/rules/style.rs:144:25 [INFO] [stdout] | [INFO] [stdout] 144 | / if leading.contains(' ') && !leading.is_empty() { [INFO] [stdout] 145 | | let space_only = leading.chars().all(|c| c == ' '); [INFO] [stdout] 146 | | if space_only && leading.len() >= config.style.indent_width { [INFO] [stdout] 147 | | diagnostics.push(Diagnostic::new( [INFO] [stdout] ... | [INFO] [stdout] 157 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 143 ~ "tabs" [INFO] [stdout] 144 ~ if leading.contains(' ') && !leading.is_empty() => { [INFO] [stdout] 145 | let space_only = leading.chars().all(|c| c == ' '); [INFO] [stdout] ... [INFO] [stdout] 156 | } [INFO] [stdout] 157 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/rules/style.rs:131:25 [INFO] [stdout] | [INFO] [stdout] 131 | / if leading.contains('\t') { [INFO] [stdout] 132 | | diagnostics.push(Diagnostic::new( [INFO] [stdout] 133 | | path, [INFO] [stdout] 134 | | line_num, [INFO] [stdout] ... | [INFO] [stdout] 140 | | )); [INFO] [stdout] 141 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 130 ~ "spaces" [INFO] [stdout] 131 ~ if leading.contains('\t') => { [INFO] [stdout] 132 | diagnostics.push(Diagnostic::new( [INFO] [stdout] ... [INFO] [stdout] 140 | )); [INFO] [stdout] 141 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/rules/style.rs:144:25 [INFO] [stdout] | [INFO] [stdout] 144 | / if leading.contains(' ') && !leading.is_empty() { [INFO] [stdout] 145 | | let space_only = leading.chars().all(|c| c == ' '); [INFO] [stdout] 146 | | if space_only && leading.len() >= config.style.indent_width { [INFO] [stdout] 147 | | diagnostics.push(Diagnostic::new( [INFO] [stdout] ... | [INFO] [stdout] 157 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 143 ~ "tabs" [INFO] [stdout] 144 ~ if leading.contains(' ') && !leading.is_empty() => { [INFO] [stdout] 145 | let space_only = leading.chars().all(|c| c == ' '); [INFO] [stdout] ... [INFO] [stdout] 156 | } [INFO] [stdout] 157 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/style.rs:171:21 [INFO] [stdout] | [INFO] [stdout] 171 | Regex::new(r"^[\w\s\*&:~]+\w+\s*\([^;]*\)\s*\{?\s*$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/style.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/style.rs:171:21 [INFO] [stdout] | [INFO] [stdout] 171 | Regex::new(r"^[\w\s\*&:~]+\w+\s*\([^;]*\)\s*\{?\s*$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/style.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] = note: `#[warn(clippy::regex_creation_in_loops)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/style.rs:244:21 [INFO] [stdout] | [INFO] [stdout] 244 | Regex::new(r"^\s*(if|else\s+if|for|while)\s*\(.*\)\s*$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/style.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/style.rs:279:17 [INFO] [stdout] | [INFO] [stdout] 279 | ... Regex::new(r"^(?:static\s+)?(?:inline\s+)?(?:const\s+)?(?:unsigned\s+)?(?:signed\s+)?(?:long\s+)?(?:short\s+)?(?:void|int|cha... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/style.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/style.rs:244:21 [INFO] [stdout] | [INFO] [stdout] 244 | Regex::new(r"^\s*(if|else\s+if|for|while)\s*\(.*\)\s*$").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/style.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/style.rs:279:17 [INFO] [stdout] | [INFO] [stdout] 279 | ... Regex::new(r"^(?:static\s+)?(?:inline\s+)?(?:const\s+)?(?:unsigned\s+)?(?:signed\s+)?(?:long\s+)?(?:short\s+)?(?:void|int|cha... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/style.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/style.rs:305:28 [INFO] [stdout] | [INFO] [stdout] 305 | let macro_re = Regex::new(r"^#define\s+(\w+)").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/style.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/style.rs:305:28 [INFO] [stdout] | [INFO] [stdout] 305 | let macro_re = Regex::new(r"^#define\s+(\w+)").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/style.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/style.rs:332:27 [INFO] [stdout] | [INFO] [stdout] 332 | ... let type_re = Regex::new(r"(?:typedef\s+(?:struct|enum|union)\s+\w*\s*\{?[^}]*\}?\s*|struct\s+|enum\s+|union\s+)(\w+)\s*[;{]"... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/style.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/style.rs:332:27 [INFO] [stdout] | [INFO] [stdout] 332 | ... let type_re = Regex::new(r"(?:typedef\s+(?:struct|enum|union)\s+\w*\s*\{?[^}]*\}?\s*|struct\s+|enum\s+|union\s+)(\w+)\s*[;{]"... [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/style.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:40:30 [INFO] [stdout] | [INFO] [stdout] 40 | let fmt_re = Regex::new( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:69:36 [INFO] [stdout] | [INFO] [stdout] 69 | let fixed_buf_re = Regex::new(r"\bchar\s+(\w+)\s*\[\s*(\d+)\s*\]").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:40:30 [INFO] [stdout] | [INFO] [stdout] 40 | let fmt_re = Regex::new( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:72:40 [INFO] [stdout] | [INFO] [stdout] 72 | let dangerous_re = Regex::new(r"\b(strcpy|strcat|memcpy)\s*\(").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:69:36 [INFO] [stdout] | [INFO] [stdout] 69 | let fixed_buf_re = Regex::new(r"\bchar\s+(\w+)\s*\[\s*(\d+)\s*\]").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:87:33 [INFO] [stdout] | [INFO] [stdout] 87 | let memcpy_re = Regex::new(r"\bmemcpy\s*\(\s*(\w+)").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:72:40 [INFO] [stdout] | [INFO] [stdout] 72 | let dangerous_re = Regex::new(r"\b(strcpy|strcat|memcpy)\s*\(").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:106:39 [INFO] [stdout] | [INFO] [stdout] 106 | let malloc_arith_re = Regex::new( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:87:33 [INFO] [stdout] | [INFO] [stdout] 87 | let memcpy_re = Regex::new(r"\bmemcpy\s*\(\s*(\w+)").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:106:39 [INFO] [stdout] | [INFO] [stdout] 106 | let malloc_arith_re = Regex::new( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:122:33 [INFO] [stdout] | [INFO] [stdout] 122 | let narrow_re = Regex::new( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:141:33 [INFO] [stdout] | [INFO] [stdout] 141 | let malloc_re = Regex::new(r"\b(\w+)\s*=\s*(?:malloc|calloc|realloc)\s*\(").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:122:33 [INFO] [stdout] | [INFO] [stdout] 122 | let narrow_re = Regex::new( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:141:33 [INFO] [stdout] | [INFO] [stdout] 141 | let malloc_re = Regex::new(r"\b(\w+)\s*=\s*(?:malloc|calloc|realloc)\s*\(").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:175:30 [INFO] [stdout] | [INFO] [stdout] 175 | let sys_re = Regex::new(r"\b(system|popen|exec[lv]p?e?)\s*\(").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:194:29 [INFO] [stdout] | [INFO] [stdout] 194 | let alloca_re = Regex::new(r"\balloca\s*\(").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:175:30 [INFO] [stdout] | [INFO] [stdout] 175 | let sys_re = Regex::new(r"\b(system|popen|exec[lv]p?e?)\s*\(").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:208:27 [INFO] [stdout] | [INFO] [stdout] 208 | let free_re = Regex::new(r"\bfree\s*\(\s*(\w+)\s*\)").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:194:29 [INFO] [stdout] | [INFO] [stdout] 194 | let alloca_re = Regex::new(r"\balloca\s*\(").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/security.rs:208:27 [INFO] [stdout] | [INFO] [stdout] 208 | let free_re = Regex::new(r"\bfree\s*\(\s*(\w+)\s*\)").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/security.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | for (idx, line) in content.lines().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rules/best_practices.rs:41:16 [INFO] [stdout] | [INFO] [stdout] 41 | if !has_pragma_once && !(has_ifndef && has_define) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(has_pragma_once || has_ifndef && has_define)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/rules/best_practices.rs:41:16 [INFO] [stdout] | [INFO] [stdout] 41 | if !has_pragma_once && !(has_ifndef && has_define) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(has_pragma_once || has_ifndef && has_define)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `last_case_line` after checking its variant with `is_some` [INFO] [stdout] --> src/rules/best_practices.rs:152:29 [INFO] [stdout] | [INFO] [stdout] 148 | && last_case_line.is_some() [INFO] [stdout] | ------------------------ the check is happening here [INFO] [stdout] ... [INFO] [stdout] 152 | last_case_line.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `last_case_line` after checking its variant with `is_some` [INFO] [stdout] --> src/rules/best_practices.rs:152:29 [INFO] [stdout] | [INFO] [stdout] 148 | && last_case_line.is_some() [INFO] [stdout] | ------------------------ the check is happening here [INFO] [stdout] ... [INFO] [stdout] 152 | last_case_line.unwrap(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/best_practices.rs:92:31 [INFO] [stdout] | [INFO] [stdout] 92 | let goto_re = Regex::new(r"\bgoto\s+\w+").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/best_practices.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/best_practices.rs:92:31 [INFO] [stdout] | [INFO] [stdout] 92 | let goto_re = Regex::new(r"\bgoto\s+\w+").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/best_practices.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/best_practices.rs:142:31 [INFO] [stdout] | [INFO] [stdout] 142 | let case_re = Regex::new(r"^\s*(case\s+.+|default)\s*:").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/best_practices.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/best_practices.rs:142:31 [INFO] [stdout] | [INFO] [stdout] 142 | let case_re = Regex::new(r"^\s*(case\s+.+|default)\s*:").unwrap(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/best_practices.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/best_practices.rs:190:34 [INFO] [stdout] | [INFO] [stdout] 190 | .any(|l| Regex::new(r"^\s*default\s*:").unwrap().is_match(l)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/best_practices.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/best_practices.rs:209:31 [INFO] [stdout] | [INFO] [stdout] 209 | let func_def_re = Regex::new( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/best_practices.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/best_practices.rs:190:34 [INFO] [stdout] | [INFO] [stdout] 190 | .any(|l| Regex::new(r"^\s*default\s*:").unwrap().is_match(l)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/best_practices.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: compiling a regex in a loop [INFO] [stdout] --> src/rules/best_practices.rs:209:31 [INFO] [stdout] | [INFO] [stdout] 209 | let func_def_re = Regex::new( [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: move the regex construction outside this loop [INFO] [stdout] --> src/rules/best_practices.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 54 | for (idx, line) in lines.iter().enumerate() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#regex_creation_in_loops [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:135:53 [INFO] [stdout] | [INFO] [stdout] 135 | let exit_code = if collection.error_count() > 0 { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 136 | | 1 [INFO] [stdout] 137 | | } else if cli.werror && collection.warning_count() > 0 { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:137:60 [INFO] [stdout] | [INFO] [stdout] 137 | } else if cli.werror && collection.warning_count() > 0 { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 138 | | 1 [INFO] [stdout] 139 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/main.rs:135:53 [INFO] [stdout] | [INFO] [stdout] 135 | let exit_code = if collection.error_count() > 0 { [INFO] [stdout] | _____________________________________________________^ [INFO] [stdout] 136 | | 1 [INFO] [stdout] 137 | | } else if cli.werror && collection.warning_count() > 0 { [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/main.rs:137:60 [INFO] [stdout] | [INFO] [stdout] 137 | } else if cli.werror && collection.warning_count() > 0 { [INFO] [stdout] | ____________________________________________________________^ [INFO] [stdout] 138 | | 1 [INFO] [stdout] 139 | | } else { [INFO] [stdout] | |_____^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 14.64s [INFO] running `Command { std: "docker" "inspect" "41b7f91657210895245489eecf9198255ba902796757f85472b90ae7abff885c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "41b7f91657210895245489eecf9198255ba902796757f85472b90ae7abff885c", kill_on_drop: false }` [INFO] [stdout] 41b7f91657210895245489eecf9198255ba902796757f85472b90ae7abff885c