[INFO] fetching crate treetags 0.7.0... [INFO] linting treetags-0.7.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate treetags 0.7.0 into /workspace/builds/worker-5-tc1/source [INFO] started tweaking crates.io crate treetags 0.7.0 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate treetags 0.7.0 [INFO] tweaked toml for crates.io crate treetags 0.7.0 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate treetags 0.7.0 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 crates.io crate treetags 0.7.0 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] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded tree-sitter-language v0.1.3 [INFO] [stderr] Downloaded tree-sitter-tags v0.26.5 [INFO] [stderr] Downloaded clap_complete v4.5.59 [INFO] [stderr] Downloaded tree-sitter-c v0.23.4 [INFO] [stderr] Downloaded tree-sitter-rust v0.23.2 [INFO] [stderr] Downloaded tree-sitter-bash v0.23.3 [INFO] [stderr] Downloaded tree-sitter-elixir v0.3.3 [INFO] [stderr] Downloaded tree-sitter v0.26.5 [INFO] [stderr] Downloaded tree-sitter-ocaml v0.24.0 [INFO] [stderr] Downloaded tree-sitter-julia v0.23.1 [INFO] [stderr] Downloaded libloading v0.9.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 6a6bded4c5204dd1e6a63c59b99099184569da49b33439e1011c64450de6ef94 [INFO] running `Command { std: "docker" "start" "-a" "6a6bded4c5204dd1e6a63c59b99099184569da49b33439e1011c64450de6ef94", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "6a6bded4c5204dd1e6a63c59b99099184569da49b33439e1011c64450de6ef94", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6a6bded4c5204dd1e6a63c59b99099184569da49b33439e1011c64450de6ef94", kill_on_drop: false }` [INFO] [stdout] 6a6bded4c5204dd1e6a63c59b99099184569da49b33439e1011c64450de6ef94 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] a21888d07a48ac1ee023b0ab99079371f65012d631235bca7ed78ef07b5edd6f [INFO] running `Command { std: "docker" "start" "-a" "a21888d07a48ac1ee023b0ab99079371f65012d631235bca7ed78ef07b5edd6f", kill_on_drop: false }` [INFO] [stderr] Checking tree-sitter-language v0.1.3 [INFO] [stderr] Checking anstyle v1.0.10 [INFO] [stderr] Compiling zmij v1.0.21 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling indexmap v2.12.1 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking anstyle-query v1.1.2 [INFO] [stderr] Checking colorchoice v1.0.3 [INFO] [stderr] Checking anstyle-parse v0.2.6 [INFO] [stderr] Checking clap_lex v0.7.4 [INFO] [stderr] Compiling tree-sitter-rust v0.23.2 [INFO] [stderr] Compiling tree-sitter-elixir v0.3.3 [INFO] [stderr] Compiling syn v2.0.96 [INFO] [stderr] Compiling tree-sitter-julia v0.23.1 [INFO] [stderr] Compiling tree-sitter-lua v0.2.0 [INFO] [stderr] Compiling tree-sitter-ocaml v0.24.0 [INFO] [stderr] Compiling tree-sitter-c-sharp v0.23.1 [INFO] [stderr] Compiling tree-sitter-cpp v0.23.4 [INFO] [stderr] Compiling tree-sitter-php v0.23.11 [INFO] [stderr] Compiling tree-sitter-bash v0.23.3 [INFO] [stderr] Compiling tree-sitter-javascript v0.23.1 [INFO] [stderr] Compiling tree-sitter-python v0.23.6 [INFO] [stderr] Compiling tree-sitter-css v0.23.2 [INFO] [stderr] Compiling tree-sitter-scala v0.24.0 [INFO] [stderr] Compiling tree-sitter-c v0.23.4 [INFO] [stderr] Compiling tree-sitter-typescript v0.23.2 [INFO] [stderr] Compiling tree-sitter-go v0.23.4 [INFO] [stderr] Compiling tree-sitter-ruby v0.23.1 [INFO] [stderr] Checking anstream v0.6.18 [INFO] [stderr] Compiling tree-sitter-java v0.23.5 [INFO] [stderr] Checking streaming-iterator v0.1.9 [INFO] [stderr] Checking toml_parser v1.0.4 [INFO] [stderr] Checking dirs-sys v0.5.0 [INFO] [stderr] Checking clap_builder v4.5.27 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Compiling treetags v0.7.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking toml v0.9.8 [INFO] [stderr] Checking libloading v0.9.0 [INFO] [stderr] Compiling tree-sitter v0.26.5 [INFO] [stderr] Checking dirs v6.0.0 [INFO] [stderr] Checking xdg v2.5.2 [INFO] [stderr] Compiling assert_cmd v2.0.17 [INFO] [stderr] Checking float-cmp v0.9.0 [INFO] [stderr] Checking predicates v3.1.3 [INFO] [stderr] Checking similar v2.7.0 [INFO] [stderr] Checking shlex v1.3.0 [INFO] [stderr] Compiling clap_derive v4.5.24 [INFO] [stderr] Compiling thiserror-impl v2.0.17 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking bstr v1.12.0 [INFO] [stderr] Checking predicates v2.1.5 [INFO] [stderr] Checking thiserror v2.0.17 [INFO] [stderr] Checking clap v4.5.27 [INFO] [stderr] Checking tree-sitter-tags v0.26.5 [INFO] [stderr] Checking clap_complete v4.5.59 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stdout] warning: use of deprecated field `config::Config::go_kinds`: Use --kinds-go instead [INFO] [stdout] --> src/config.rs:344:14 [INFO] [stdout] | [INFO] [stdout] 344 | &self.go_kinds [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `config::Config::rust_kinds`: Use --kinds-rust instead [INFO] [stdout] --> src/config.rs:353:14 [INFO] [stdout] | [INFO] [stdout] 353 | &self.rust_kinds [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `config::Config::go_kinds`: Use --kinds-go instead [INFO] [stdout] --> src/config.rs:344:14 [INFO] [stdout] | [INFO] [stdout] 344 | &self.go_kinds [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `config::Config::rust_kinds`: Use --kinds-rust instead [INFO] [stdout] --> src/config.rs:353:14 [INFO] [stdout] | [INFO] [stdout] 353 | &self.rust_kinds [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/config.rs:282:13 [INFO] [stdout] | [INFO] [stdout] 282 | entries.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 282 - entries.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] 282 + entries.sort_by_key(|a| a.file_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FileFinderResult` [INFO] [stdout] --> src/file_finder.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / pub fn new() -> Self { [INFO] [stdout] 29 | | Self { [INFO] [stdout] 30 | | files: Vec::new(), [INFO] [stdout] 31 | | errors: Vec::new(), [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 + impl Default for FileFinderResult { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/file_finder.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | / if let Err(e) = validate_existing_tag_file(&tag_file_path) { [INFO] [stdout] 268 | | return Err(e); [INFO] [stdout] 269 | | } [INFO] [stdout] | |_____________^ help: replace it with: `validate_existing_tag_file(&tag_file_path)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/parser/common/tag_config.rs:296:27 [INFO] [stdout] | [INFO] [stdout] 296 | ('+', &entry[1..]) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/parser/common/tag_config.rs:295:45 [INFO] [stdout] | [INFO] [stdout] 295 | let (operation, kind_str) = if entry.starts_with('+') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 295 ~ let (operation, kind_str) = if let Some() = entry.strip_prefix('+') { [INFO] [stdout] 296 ~ ('+', ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/parser/common/tag_config.rs:298:27 [INFO] [stdout] | [INFO] [stdout] 298 | ('-', &entry[1..]) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/parser/common/tag_config.rs:297:24 [INFO] [stdout] | [INFO] [stdout] 297 | } else if entry.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 297 ~ } else if let Some() = entry.strip_prefix('-') { [INFO] [stdout] 298 ~ ('-', ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/parser/cpp.rs:353:9 [INFO] [stdout] | [INFO] [stdout] 353 | / if let Some(scope_type) = scope_type { [INFO] [stdout] 354 | | Some((scope_type, name)) [INFO] [stdout] 355 | | } else { [INFO] [stdout] 356 | | None [INFO] [stdout] 357 | | } [INFO] [stdout] | |_________^ help: try: `scope_type.map(|scope_type| (scope_type, name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/parser/cpp.rs:647:56 [INFO] [stdout] | [INFO] [stdout] 647 | context.base.node_text(&child_node).to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/parser/cpp.rs:703:21 [INFO] [stdout] | [INFO] [stdout] 703 | / match decl_child.kind() { [INFO] [stdout] 704 | | "identifier" => { [INFO] [stdout] 705 | | let var_name = context.base.node_text(&decl_child).to_string(); [INFO] [stdout] 706 | | variable_names.push((var_name, decl_child)); [INFO] [stdout] 707 | | } [INFO] [stdout] 708 | | _ => {} [INFO] [stdout] 709 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 703 ~ if decl_child.kind() == "identifier" { [INFO] [stdout] 704 + let var_name = context.base.node_text(&decl_child).to_string(); [INFO] [stdout] 705 + variable_names.push((var_name, decl_child)); [INFO] [stdout] 706 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/config.rs:282:13 [INFO] [stdout] | [INFO] [stdout] 282 | entries.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 282 - entries.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] 282 + entries.sort_by_key(|a| a.file_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 95 | / if context.user_config.fields_config.is_field_enabled("scope") [INFO] [stdout] 96 | | || context.user_config.extras_config.qualified [INFO] [stdout] 97 | | { [INFO] [stdout] 98 | | if let Some(extras) = &extra_fields { [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [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] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:357:17 [INFO] [stdout] | [INFO] [stdout] 357 | / if cursor.goto_first_child() { [INFO] [stdout] 358 | | loop { [INFO] [stdout] 359 | | let spec_node = cursor.node(); [INFO] [stdout] 360 | | if spec_node.kind() == "import_spec" { [INFO] [stdout] ... | [INFO] [stdout] 378 | | cursor.goto_parent(); [INFO] [stdout] 379 | | } [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] 356 ~ "import_spec_list" [INFO] [stdout] 357 ~ if cursor.goto_first_child() => { [INFO] [stdout] 358 | loop { [INFO] [stdout] ... [INFO] [stdout] 378 | cursor.goto_parent(); [INFO] [stdout] 379 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `FileFinderResult` [INFO] [stdout] --> src/file_finder.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | / pub fn new() -> Self { [INFO] [stdout] 29 | | Self { [INFO] [stdout] 30 | | files: Vec::new(), [INFO] [stdout] 31 | | errors: Vec::new(), [INFO] [stdout] 32 | | } [INFO] [stdout] 33 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 26 + impl Default for FileFinderResult { [INFO] [stdout] 27 + fn default() -> Self { [INFO] [stdout] 28 + Self::new() [INFO] [stdout] 29 + } [INFO] [stdout] 30 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:608:17 [INFO] [stdout] | [INFO] [stdout] 608 | / if cursor.goto_first_child() { [INFO] [stdout] 609 | | loop { [INFO] [stdout] 610 | | let spec_node = cursor.node(); [INFO] [stdout] 611 | | if spec_node.kind() == "const_spec" { [INFO] [stdout] ... | [INFO] [stdout] 618 | | cursor.goto_parent(); [INFO] [stdout] 619 | | } [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] 606 ~ "const_spec_list" [INFO] [stdout] 607 | // Handle grouped const specs [INFO] [stdout] 608 ~ if cursor.goto_first_child() => { [INFO] [stdout] 609 | loop { [INFO] [stdout] ... [INFO] [stdout] 618 | cursor.goto_parent(); [INFO] [stdout] 619 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:667:17 [INFO] [stdout] | [INFO] [stdout] 667 | / if cursor.goto_first_child() { [INFO] [stdout] 668 | | loop { [INFO] [stdout] 669 | | let spec_node = cursor.node(); [INFO] [stdout] 670 | | if spec_node.kind() == "var_spec" { [INFO] [stdout] ... | [INFO] [stdout] 677 | | cursor.goto_parent(); [INFO] [stdout] 678 | | } [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] 665 ~ "var_spec_list" [INFO] [stdout] 666 | // Handle grouped var specs [INFO] [stdout] 667 ~ if cursor.goto_first_child() => { [INFO] [stdout] 668 | loop { [INFO] [stdout] ... [INFO] [stdout] 677 | cursor.goto_parent(); [INFO] [stdout] 678 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/file_finder.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | / if let Err(e) = validate_existing_tag_file(&tag_file_path) { [INFO] [stdout] 268 | | return Err(e); [INFO] [stdout] 269 | | } [INFO] [stdout] | |_____________^ help: replace it with: `validate_existing_tag_file(&tag_file_path)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/parser/common/tag_config.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 189 | impl TagKindConfig { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/parser/common/tag_config.rs:296:27 [INFO] [stdout] | [INFO] [stdout] 296 | ('+', &entry[1..]) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/parser/common/tag_config.rs:295:45 [INFO] [stdout] | [INFO] [stdout] 295 | let (operation, kind_str) = if entry.starts_with('+') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 295 ~ let (operation, kind_str) = if let Some() = entry.strip_prefix('+') { [INFO] [stdout] 296 ~ ('+', ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/parser/common/tag_config.rs:298:27 [INFO] [stdout] | [INFO] [stdout] 298 | ('-', &entry[1..]) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/parser/common/tag_config.rs:297:24 [INFO] [stdout] | [INFO] [stdout] 297 | } else if entry.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 297 ~ } else if let Some() = entry.strip_prefix('-') { [INFO] [stdout] 298 ~ ('-', ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/js.rs:498:20 [INFO] [stdout] | [INFO] [stdout] 498 | } else if child.kind() == "parenthesized_expression" { [INFO] [stdout] | ____________________^ [INFO] [stdout] 499 | | if cursor.goto_first_child() { [INFO] [stdout] 500 | | loop { [INFO] [stdout] 501 | | let inner = cursor.node(); [INFO] [stdout] ... | [INFO] [stdout] 515 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 498 ~ } else if child.kind() == "parenthesized_expression" [INFO] [stdout] 499 ~ && cursor.goto_first_child() { [INFO] [stdout] 500 | loop { [INFO] [stdout] ... [INFO] [stdout] 513 | cursor.goto_parent(); [INFO] [stdout] 514 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser/python.rs:284:25 [INFO] [stdout] | [INFO] [stdout] 284 | let is_method = context.scope_stack.last().map_or(false, |(scope_type, _)| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 285 | | matches!(scope_type, ScopeType::Class) [INFO] [stdout] 286 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 284 - let is_method = context.scope_stack.last().map_or(false, |(scope_type, _)| { [INFO] [stdout] 284 + let is_method = context.scope_stack.last().is_some_and(|(scope_type, _)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/python.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | / if val.kind() == "lambda" { [INFO] [stdout] 383 | | if target_node.kind() == "identifier" { [INFO] [stdout] 384 | | let name = context.base.node_text(&target_node).to_string(); [INFO] [stdout] ... | [INFO] [stdout] 408 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 382 ~ if val.kind() == "lambda" [INFO] [stdout] 383 ~ && target_node.kind() == "identifier" { [INFO] [stdout] 384 | let name = context.base.node_text(&target_node).to_string(); [INFO] [stdout] ... [INFO] [stdout] 406 | create_tag(name, kind, assignment_node, context, Some(extras)); [INFO] [stdout] 407 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/python.rs:427:5 [INFO] [stdout] | [INFO] [stdout] 427 | / if definition_node.is_some() { [INFO] [stdout] 428 | | if cursor.goto_first_child() { [INFO] [stdout] 429 | | loop { [INFO] [stdout] 430 | | if cursor.field_name() == Some("definition") { [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 427 ~ if definition_node.is_some() [INFO] [stdout] 428 ~ && cursor.goto_first_child() { [INFO] [stdout] 429 | loop { [INFO] [stdout] ... [INFO] [stdout] 439 | cursor.goto_parent(); [INFO] [stdout] 440 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/parser/cpp.rs:353:9 [INFO] [stdout] | [INFO] [stdout] 353 | / if let Some(scope_type) = scope_type { [INFO] [stdout] 354 | | Some((scope_type, name)) [INFO] [stdout] 355 | | } else { [INFO] [stdout] 356 | | None [INFO] [stdout] 357 | | } [INFO] [stdout] | |_________^ help: try: `scope_type.map(|scope_type| (scope_type, name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/parser/cpp.rs:647:56 [INFO] [stdout] | [INFO] [stdout] 647 | context.base.node_text(&child_node).to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/parser/cpp.rs:703:21 [INFO] [stdout] | [INFO] [stdout] 703 | / match decl_child.kind() { [INFO] [stdout] 704 | | "identifier" => { [INFO] [stdout] 705 | | let var_name = context.base.node_text(&decl_child).to_string(); [INFO] [stdout] 706 | | variable_names.push((var_name, decl_child)); [INFO] [stdout] 707 | | } [INFO] [stdout] 708 | | _ => {} [INFO] [stdout] 709 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 703 ~ if decl_child.kind() == "identifier" { [INFO] [stdout] 704 + let var_name = context.base.node_text(&decl_child).to_string(); [INFO] [stdout] 705 + variable_names.push((var_name, decl_child)); [INFO] [stdout] 706 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/typescript.rs:465:21 [INFO] [stdout] | [INFO] [stdout] 465 | / if parent_cursor.goto_first_child() { [INFO] [stdout] 466 | | if context.base.node_text(&parent_cursor.node()) == "const" { [INFO] [stdout] 467 | | is_const = true; [INFO] [stdout] 468 | | } [INFO] [stdout] 469 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 465 ~ if parent_cursor.goto_first_child() [INFO] [stdout] 466 ~ && context.base.node_text(&parent_cursor.node()) == "const" { [INFO] [stdout] 467 | is_const = true; [INFO] [stdout] 468 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 95 | / if context.user_config.fields_config.is_field_enabled("scope") [INFO] [stdout] 96 | | || context.user_config.extras_config.qualified [INFO] [stdout] 97 | | { [INFO] [stdout] 98 | | if let Some(extras) = &extra_fields { [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [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] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:357:17 [INFO] [stdout] | [INFO] [stdout] 357 | / if cursor.goto_first_child() { [INFO] [stdout] 358 | | loop { [INFO] [stdout] 359 | | let spec_node = cursor.node(); [INFO] [stdout] 360 | | if spec_node.kind() == "import_spec" { [INFO] [stdout] ... | [INFO] [stdout] 378 | | cursor.goto_parent(); [INFO] [stdout] 379 | | } [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] 356 ~ "import_spec_list" [INFO] [stdout] 357 ~ if cursor.goto_first_child() => { [INFO] [stdout] 358 | loop { [INFO] [stdout] ... [INFO] [stdout] 378 | cursor.goto_parent(); [INFO] [stdout] 379 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:608:17 [INFO] [stdout] | [INFO] [stdout] 608 | / if cursor.goto_first_child() { [INFO] [stdout] 609 | | loop { [INFO] [stdout] 610 | | let spec_node = cursor.node(); [INFO] [stdout] 611 | | if spec_node.kind() == "const_spec" { [INFO] [stdout] ... | [INFO] [stdout] 618 | | cursor.goto_parent(); [INFO] [stdout] 619 | | } [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] 606 ~ "const_spec_list" [INFO] [stdout] 607 | // Handle grouped const specs [INFO] [stdout] 608 ~ if cursor.goto_first_child() => { [INFO] [stdout] 609 | loop { [INFO] [stdout] ... [INFO] [stdout] 618 | cursor.goto_parent(); [INFO] [stdout] 619 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:667:17 [INFO] [stdout] | [INFO] [stdout] 667 | / if cursor.goto_first_child() { [INFO] [stdout] 668 | | loop { [INFO] [stdout] 669 | | let spec_node = cursor.node(); [INFO] [stdout] 670 | | if spec_node.kind() == "var_spec" { [INFO] [stdout] ... | [INFO] [stdout] 677 | | cursor.goto_parent(); [INFO] [stdout] 678 | | } [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] 665 ~ "var_spec_list" [INFO] [stdout] 666 | // Handle grouped var specs [INFO] [stdout] 667 ~ if cursor.goto_first_child() => { [INFO] [stdout] 668 | loop { [INFO] [stdout] ... [INFO] [stdout] 677 | cursor.goto_parent(); [INFO] [stdout] 678 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/user_grammars.rs:62:24 [INFO] [stdout] | [INFO] [stdout] 62 | if lang_version > LANGUAGE_VERSION [INFO] [stdout] | ________________________^ [INFO] [stdout] 63 | | || lang_version < MIN_COMPATIBLE_LANGUAGE_VERSION [INFO] [stdout] | |_________________________________________________________________________^ help: use: `!(MIN_COMPATIBLE_LANGUAGE_VERSION..=LANGUAGE_VERSION).contains(&lang_version)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/js.rs:498:20 [INFO] [stdout] | [INFO] [stdout] 498 | } else if child.kind() == "parenthesized_expression" { [INFO] [stdout] | ____________________^ [INFO] [stdout] 499 | | if cursor.goto_first_child() { [INFO] [stdout] 500 | | loop { [INFO] [stdout] 501 | | let inner = cursor.node(); [INFO] [stdout] ... | [INFO] [stdout] 515 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 498 ~ } else if child.kind() == "parenthesized_expression" [INFO] [stdout] 499 ~ && cursor.goto_first_child() { [INFO] [stdout] 500 | loop { [INFO] [stdout] ... [INFO] [stdout] 513 | cursor.goto_parent(); [INFO] [stdout] 514 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser/python.rs:284:25 [INFO] [stdout] | [INFO] [stdout] 284 | let is_method = context.scope_stack.last().map_or(false, |(scope_type, _)| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 285 | | matches!(scope_type, ScopeType::Class) [INFO] [stdout] 286 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 284 - let is_method = context.scope_stack.last().map_or(false, |(scope_type, _)| { [INFO] [stdout] 284 + let is_method = context.scope_stack.last().is_some_and(|(scope_type, _)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/python.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | / if val.kind() == "lambda" { [INFO] [stdout] 383 | | if target_node.kind() == "identifier" { [INFO] [stdout] 384 | | let name = context.base.node_text(&target_node).to_string(); [INFO] [stdout] ... | [INFO] [stdout] 408 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 382 ~ if val.kind() == "lambda" [INFO] [stdout] 383 ~ && target_node.kind() == "identifier" { [INFO] [stdout] 384 | let name = context.base.node_text(&target_node).to_string(); [INFO] [stdout] ... [INFO] [stdout] 406 | create_tag(name, kind, assignment_node, context, Some(extras)); [INFO] [stdout] 407 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/python.rs:427:5 [INFO] [stdout] | [INFO] [stdout] 427 | / if definition_node.is_some() { [INFO] [stdout] 428 | | if cursor.goto_first_child() { [INFO] [stdout] 429 | | loop { [INFO] [stdout] 430 | | if cursor.field_name() == Some("definition") { [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 427 ~ if definition_node.is_some() [INFO] [stdout] 428 ~ && cursor.goto_first_child() { [INFO] [stdout] 429 | loop { [INFO] [stdout] ... [INFO] [stdout] 439 | cursor.goto_parent(); [INFO] [stdout] 440 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/typescript.rs:465:21 [INFO] [stdout] | [INFO] [stdout] 465 | / if parent_cursor.goto_first_child() { [INFO] [stdout] 466 | | if context.base.node_text(&parent_cursor.node()) == "const" { [INFO] [stdout] 467 | | is_const = true; [INFO] [stdout] 468 | | } [INFO] [stdout] 469 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 465 ~ if parent_cursor.goto_first_child() [INFO] [stdout] 466 ~ && context.base.node_text(&parent_cursor.node()) == "const" { [INFO] [stdout] 467 | is_const = true; [INFO] [stdout] 468 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/user_grammars.rs:62:24 [INFO] [stdout] | [INFO] [stdout] 62 | if lang_version > LANGUAGE_VERSION [INFO] [stdout] | ________________________^ [INFO] [stdout] 63 | | || lang_version < MIN_COMPATIBLE_LANGUAGE_VERSION [INFO] [stdout] | |_________________________________________________________________________^ help: use: `!(MIN_COMPATIBLE_LANGUAGE_VERSION..=LANGUAGE_VERSION).contains(&lang_version)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `config::Config::go_kinds`: Use --kinds-go instead [INFO] [stdout] --> src/config.rs:344:14 [INFO] [stdout] | [INFO] [stdout] 344 | &self.go_kinds [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `config::Config::rust_kinds`: Use --kinds-rust instead [INFO] [stdout] --> src/config.rs:353:14 [INFO] [stdout] | [INFO] [stdout] 353 | &self.rust_kinds [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `config::Config::go_kinds`: Use --kinds-go instead [INFO] [stdout] --> src/config.rs:344:14 [INFO] [stdout] | [INFO] [stdout] 344 | &self.go_kinds [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated field `config::Config::rust_kinds`: Use --kinds-rust instead [INFO] [stdout] --> src/config.rs:353:14 [INFO] [stdout] | [INFO] [stdout] 353 | &self.rust_kinds [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/config.rs:282:13 [INFO] [stdout] | [INFO] [stdout] 282 | entries.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 282 - entries.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] 282 + entries.sort_by_key(|a| a.file_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/file_finder.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | / if let Err(e) = validate_existing_tag_file(&tag_file_path) { [INFO] [stdout] 268 | | return Err(e); [INFO] [stdout] 269 | | } [INFO] [stdout] | |_____________^ help: replace it with: `validate_existing_tag_file(&tag_file_path)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/parser/common/tag_config.rs:296:27 [INFO] [stdout] | [INFO] [stdout] 296 | ('+', &entry[1..]) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/parser/common/tag_config.rs:295:45 [INFO] [stdout] | [INFO] [stdout] 295 | let (operation, kind_str) = if entry.starts_with('+') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 295 ~ let (operation, kind_str) = if let Some() = entry.strip_prefix('+') { [INFO] [stdout] 296 ~ ('+', ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/parser/common/tag_config.rs:298:27 [INFO] [stdout] | [INFO] [stdout] 298 | ('-', &entry[1..]) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/parser/common/tag_config.rs:297:24 [INFO] [stdout] | [INFO] [stdout] 297 | } else if entry.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 297 ~ } else if let Some() = entry.strip_prefix('-') { [INFO] [stdout] 298 ~ ('-', ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/parser/cpp.rs:353:9 [INFO] [stdout] | [INFO] [stdout] 353 | / if let Some(scope_type) = scope_type { [INFO] [stdout] 354 | | Some((scope_type, name)) [INFO] [stdout] 355 | | } else { [INFO] [stdout] 356 | | None [INFO] [stdout] 357 | | } [INFO] [stdout] | |_________^ help: try: `scope_type.map(|scope_type| (scope_type, name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/parser/cpp.rs:647:56 [INFO] [stdout] | [INFO] [stdout] 647 | context.base.node_text(&child_node).to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/parser/cpp.rs:703:21 [INFO] [stdout] | [INFO] [stdout] 703 | / match decl_child.kind() { [INFO] [stdout] 704 | | "identifier" => { [INFO] [stdout] 705 | | let var_name = context.base.node_text(&decl_child).to_string(); [INFO] [stdout] 706 | | variable_names.push((var_name, decl_child)); [INFO] [stdout] 707 | | } [INFO] [stdout] 708 | | _ => {} [INFO] [stdout] 709 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 703 ~ if decl_child.kind() == "identifier" { [INFO] [stdout] 704 + let var_name = context.base.node_text(&decl_child).to_string(); [INFO] [stdout] 705 + variable_names.push((var_name, decl_child)); [INFO] [stdout] 706 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 95 | / if context.user_config.fields_config.is_field_enabled("scope") [INFO] [stdout] 96 | | || context.user_config.extras_config.qualified [INFO] [stdout] 97 | | { [INFO] [stdout] 98 | | if let Some(extras) = &extra_fields { [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [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] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:357:17 [INFO] [stdout] | [INFO] [stdout] 357 | / if cursor.goto_first_child() { [INFO] [stdout] 358 | | loop { [INFO] [stdout] 359 | | let spec_node = cursor.node(); [INFO] [stdout] 360 | | if spec_node.kind() == "import_spec" { [INFO] [stdout] ... | [INFO] [stdout] 378 | | cursor.goto_parent(); [INFO] [stdout] 379 | | } [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] 356 ~ "import_spec_list" [INFO] [stdout] 357 ~ if cursor.goto_first_child() => { [INFO] [stdout] 358 | loop { [INFO] [stdout] ... [INFO] [stdout] 378 | cursor.goto_parent(); [INFO] [stdout] 379 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:608:17 [INFO] [stdout] | [INFO] [stdout] 608 | / if cursor.goto_first_child() { [INFO] [stdout] 609 | | loop { [INFO] [stdout] 610 | | let spec_node = cursor.node(); [INFO] [stdout] 611 | | if spec_node.kind() == "const_spec" { [INFO] [stdout] ... | [INFO] [stdout] 618 | | cursor.goto_parent(); [INFO] [stdout] 619 | | } [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] 606 ~ "const_spec_list" [INFO] [stdout] 607 | // Handle grouped const specs [INFO] [stdout] 608 ~ if cursor.goto_first_child() => { [INFO] [stdout] 609 | loop { [INFO] [stdout] ... [INFO] [stdout] 618 | cursor.goto_parent(); [INFO] [stdout] 619 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:667:17 [INFO] [stdout] | [INFO] [stdout] 667 | / if cursor.goto_first_child() { [INFO] [stdout] 668 | | loop { [INFO] [stdout] 669 | | let spec_node = cursor.node(); [INFO] [stdout] 670 | | if spec_node.kind() == "var_spec" { [INFO] [stdout] ... | [INFO] [stdout] 677 | | cursor.goto_parent(); [INFO] [stdout] 678 | | } [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] 665 ~ "var_spec_list" [INFO] [stdout] 666 | // Handle grouped var specs [INFO] [stdout] 667 ~ if cursor.goto_first_child() => { [INFO] [stdout] 668 | loop { [INFO] [stdout] ... [INFO] [stdout] 677 | cursor.goto_parent(); [INFO] [stdout] 678 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/js.rs:498:20 [INFO] [stdout] | [INFO] [stdout] 498 | } else if child.kind() == "parenthesized_expression" { [INFO] [stdout] | ____________________^ [INFO] [stdout] 499 | | if cursor.goto_first_child() { [INFO] [stdout] 500 | | loop { [INFO] [stdout] 501 | | let inner = cursor.node(); [INFO] [stdout] ... | [INFO] [stdout] 515 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 498 ~ } else if child.kind() == "parenthesized_expression" [INFO] [stdout] 499 ~ && cursor.goto_first_child() { [INFO] [stdout] 500 | loop { [INFO] [stdout] ... [INFO] [stdout] 513 | cursor.goto_parent(); [INFO] [stdout] 514 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser/python.rs:284:25 [INFO] [stdout] | [INFO] [stdout] 284 | let is_method = context.scope_stack.last().map_or(false, |(scope_type, _)| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 285 | | matches!(scope_type, ScopeType::Class) [INFO] [stdout] 286 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 284 - let is_method = context.scope_stack.last().map_or(false, |(scope_type, _)| { [INFO] [stdout] 284 + let is_method = context.scope_stack.last().is_some_and(|(scope_type, _)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/python.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | / if val.kind() == "lambda" { [INFO] [stdout] 383 | | if target_node.kind() == "identifier" { [INFO] [stdout] 384 | | let name = context.base.node_text(&target_node).to_string(); [INFO] [stdout] ... | [INFO] [stdout] 408 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 382 ~ if val.kind() == "lambda" [INFO] [stdout] 383 ~ && target_node.kind() == "identifier" { [INFO] [stdout] 384 | let name = context.base.node_text(&target_node).to_string(); [INFO] [stdout] ... [INFO] [stdout] 406 | create_tag(name, kind, assignment_node, context, Some(extras)); [INFO] [stdout] 407 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/python.rs:427:5 [INFO] [stdout] | [INFO] [stdout] 427 | / if definition_node.is_some() { [INFO] [stdout] 428 | | if cursor.goto_first_child() { [INFO] [stdout] 429 | | loop { [INFO] [stdout] 430 | | if cursor.field_name() == Some("definition") { [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 427 ~ if definition_node.is_some() [INFO] [stdout] 428 ~ && cursor.goto_first_child() { [INFO] [stdout] 429 | loop { [INFO] [stdout] ... [INFO] [stdout] 439 | cursor.goto_parent(); [INFO] [stdout] 440 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/typescript.rs:465:21 [INFO] [stdout] | [INFO] [stdout] 465 | / if parent_cursor.goto_first_child() { [INFO] [stdout] 466 | | if context.base.node_text(&parent_cursor.node()) == "const" { [INFO] [stdout] 467 | | is_const = true; [INFO] [stdout] 468 | | } [INFO] [stdout] 469 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 465 ~ if parent_cursor.goto_first_child() [INFO] [stdout] 466 ~ && context.base.node_text(&parent_cursor.node()) == "const" { [INFO] [stdout] 467 | is_const = true; [INFO] [stdout] 468 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/user_grammars.rs:62:24 [INFO] [stdout] | [INFO] [stdout] 62 | if lang_version > LANGUAGE_VERSION [INFO] [stdout] | ________________________^ [INFO] [stdout] 63 | | || lang_version < MIN_COMPATIBLE_LANGUAGE_VERSION [INFO] [stdout] | |_________________________________________________________________________^ help: use: `!(MIN_COMPATIBLE_LANGUAGE_VERSION..=LANGUAGE_VERSION).contains(&lang_version)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/config.rs:282:13 [INFO] [stdout] | [INFO] [stdout] 282 | entries.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 282 - entries.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] 282 + entries.sort_by_key(|a| a.file_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this block may be rewritten with the `?` operator [INFO] [stdout] --> src/file_finder.rs:267:13 [INFO] [stdout] | [INFO] [stdout] 267 | / if let Err(e) = validate_existing_tag_file(&tag_file_path) { [INFO] [stdout] 268 | | return Err(e); [INFO] [stdout] 269 | | } [INFO] [stdout] | |_____________^ help: replace it with: `validate_existing_tag_file(&tag_file_path)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/parser/common/tag_config.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 189 | impl TagKindConfig { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/parser/common/tag_config.rs:296:27 [INFO] [stdout] | [INFO] [stdout] 296 | ('+', &entry[1..]) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/parser/common/tag_config.rs:295:45 [INFO] [stdout] | [INFO] [stdout] 295 | let (operation, kind_str) = if entry.starts_with('+') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 295 ~ let (operation, kind_str) = if let Some() = entry.strip_prefix('+') { [INFO] [stdout] 296 ~ ('+', ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/parser/common/tag_config.rs:298:27 [INFO] [stdout] | [INFO] [stdout] 298 | ('-', &entry[1..]) [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/parser/common/tag_config.rs:297:24 [INFO] [stdout] | [INFO] [stdout] 297 | } else if entry.starts_with('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 297 ~ } else if let Some() = entry.strip_prefix('-') { [INFO] [stdout] 298 ~ ('-', ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/parser/cpp.rs:353:9 [INFO] [stdout] | [INFO] [stdout] 353 | / if let Some(scope_type) = scope_type { [INFO] [stdout] 354 | | Some((scope_type, name)) [INFO] [stdout] 355 | | } else { [INFO] [stdout] 356 | | None [INFO] [stdout] 357 | | } [INFO] [stdout] | |_________^ help: try: `scope_type.map(|scope_type| (scope_type, name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/parser/cpp.rs:647:56 [INFO] [stdout] | [INFO] [stdout] 647 | context.base.node_text(&child_node).to_string() [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/parser/cpp.rs:703:21 [INFO] [stdout] | [INFO] [stdout] 703 | / match decl_child.kind() { [INFO] [stdout] 704 | | "identifier" => { [INFO] [stdout] 705 | | let var_name = context.base.node_text(&decl_child).to_string(); [INFO] [stdout] 706 | | variable_names.push((var_name, decl_child)); [INFO] [stdout] 707 | | } [INFO] [stdout] 708 | | _ => {} [INFO] [stdout] 709 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 703 ~ if decl_child.kind() == "identifier" { [INFO] [stdout] 704 + let var_name = context.base.node_text(&decl_child).to_string(); [INFO] [stdout] 705 + variable_names.push((var_name, decl_child)); [INFO] [stdout] 706 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:95:17 [INFO] [stdout] | [INFO] [stdout] 95 | / if context.user_config.fields_config.is_field_enabled("scope") [INFO] [stdout] 96 | | || context.user_config.extras_config.qualified [INFO] [stdout] 97 | | { [INFO] [stdout] 98 | | if let Some(extras) = &extra_fields { [INFO] [stdout] ... | [INFO] [stdout] 103 | | } [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] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:357:17 [INFO] [stdout] | [INFO] [stdout] 357 | / if cursor.goto_first_child() { [INFO] [stdout] 358 | | loop { [INFO] [stdout] 359 | | let spec_node = cursor.node(); [INFO] [stdout] 360 | | if spec_node.kind() == "import_spec" { [INFO] [stdout] ... | [INFO] [stdout] 378 | | cursor.goto_parent(); [INFO] [stdout] 379 | | } [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] 356 ~ "import_spec_list" [INFO] [stdout] 357 ~ if cursor.goto_first_child() => { [INFO] [stdout] 358 | loop { [INFO] [stdout] ... [INFO] [stdout] 378 | cursor.goto_parent(); [INFO] [stdout] 379 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:608:17 [INFO] [stdout] | [INFO] [stdout] 608 | / if cursor.goto_first_child() { [INFO] [stdout] 609 | | loop { [INFO] [stdout] 610 | | let spec_node = cursor.node(); [INFO] [stdout] 611 | | if spec_node.kind() == "const_spec" { [INFO] [stdout] ... | [INFO] [stdout] 618 | | cursor.goto_parent(); [INFO] [stdout] 619 | | } [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] 606 ~ "const_spec_list" [INFO] [stdout] 607 | // Handle grouped const specs [INFO] [stdout] 608 ~ if cursor.goto_first_child() => { [INFO] [stdout] 609 | loop { [INFO] [stdout] ... [INFO] [stdout] 618 | cursor.goto_parent(); [INFO] [stdout] 619 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser/go.rs:667:17 [INFO] [stdout] | [INFO] [stdout] 667 | / if cursor.goto_first_child() { [INFO] [stdout] 668 | | loop { [INFO] [stdout] 669 | | let spec_node = cursor.node(); [INFO] [stdout] 670 | | if spec_node.kind() == "var_spec" { [INFO] [stdout] ... | [INFO] [stdout] 677 | | cursor.goto_parent(); [INFO] [stdout] 678 | | } [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] 665 ~ "var_spec_list" [INFO] [stdout] 666 | // Handle grouped var specs [INFO] [stdout] 667 ~ if cursor.goto_first_child() => { [INFO] [stdout] 668 | loop { [INFO] [stdout] ... [INFO] [stdout] 677 | cursor.goto_parent(); [INFO] [stdout] 678 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/js.rs:498:20 [INFO] [stdout] | [INFO] [stdout] 498 | } else if child.kind() == "parenthesized_expression" { [INFO] [stdout] | ____________________^ [INFO] [stdout] 499 | | if cursor.goto_first_child() { [INFO] [stdout] 500 | | loop { [INFO] [stdout] 501 | | let inner = cursor.node(); [INFO] [stdout] ... | [INFO] [stdout] 515 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 498 ~ } else if child.kind() == "parenthesized_expression" [INFO] [stdout] 499 ~ && cursor.goto_first_child() { [INFO] [stdout] 500 | loop { [INFO] [stdout] ... [INFO] [stdout] 513 | cursor.goto_parent(); [INFO] [stdout] 514 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/parser/python.rs:284:25 [INFO] [stdout] | [INFO] [stdout] 284 | let is_method = context.scope_stack.last().map_or(false, |(scope_type, _)| { [INFO] [stdout] | _________________________^ [INFO] [stdout] 285 | | matches!(scope_type, ScopeType::Class) [INFO] [stdout] 286 | | }); [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 284 - let is_method = context.scope_stack.last().map_or(false, |(scope_type, _)| { [INFO] [stdout] 284 + let is_method = context.scope_stack.last().is_some_and(|(scope_type, _)| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/python.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | / if val.kind() == "lambda" { [INFO] [stdout] 383 | | if target_node.kind() == "identifier" { [INFO] [stdout] 384 | | let name = context.base.node_text(&target_node).to_string(); [INFO] [stdout] ... | [INFO] [stdout] 408 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 382 ~ if val.kind() == "lambda" [INFO] [stdout] 383 ~ && target_node.kind() == "identifier" { [INFO] [stdout] 384 | let name = context.base.node_text(&target_node).to_string(); [INFO] [stdout] ... [INFO] [stdout] 406 | create_tag(name, kind, assignment_node, context, Some(extras)); [INFO] [stdout] 407 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/python.rs:427:5 [INFO] [stdout] | [INFO] [stdout] 427 | / if definition_node.is_some() { [INFO] [stdout] 428 | | if cursor.goto_first_child() { [INFO] [stdout] 429 | | loop { [INFO] [stdout] 430 | | if cursor.field_name() == Some("definition") { [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 427 ~ if definition_node.is_some() [INFO] [stdout] 428 ~ && cursor.goto_first_child() { [INFO] [stdout] 429 | loop { [INFO] [stdout] ... [INFO] [stdout] 439 | cursor.goto_parent(); [INFO] [stdout] 440 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/parser/typescript.rs:465:21 [INFO] [stdout] | [INFO] [stdout] 465 | / if parent_cursor.goto_first_child() { [INFO] [stdout] 466 | | if context.base.node_text(&parent_cursor.node()) == "const" { [INFO] [stdout] 467 | | is_const = true; [INFO] [stdout] 468 | | } [INFO] [stdout] 469 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 465 ~ if parent_cursor.goto_first_child() [INFO] [stdout] 466 ~ && context.base.node_text(&parent_cursor.node()) == "const" { [INFO] [stdout] 467 | is_const = true; [INFO] [stdout] 468 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/user_grammars.rs:62:24 [INFO] [stdout] | [INFO] [stdout] 62 | if lang_version > LANGUAGE_VERSION [INFO] [stdout] | ________________________^ [INFO] [stdout] 63 | | || lang_version < MIN_COMPATIBLE_LANGUAGE_VERSION [INFO] [stdout] | |_________________________________________________________________________^ help: use: `!(MIN_COMPATIBLE_LANGUAGE_VERSION..=LANGUAGE_VERSION).contains(&lang_version)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 56.39s [INFO] running `Command { std: "docker" "inspect" "a21888d07a48ac1ee023b0ab99079371f65012d631235bca7ed78ef07b5edd6f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a21888d07a48ac1ee023b0ab99079371f65012d631235bca7ed78ef07b5edd6f", kill_on_drop: false }` [INFO] [stdout] a21888d07a48ac1ee023b0ab99079371f65012d631235bca7ed78ef07b5edd6f