Skip to content

Fix #119: nofmt comment filtering - #120

Merged
andrewbaxter merged 3 commits into
masterfrom
fix-nofmt-comment-filtering
Oct 29, 2025
Merged

Fix #119: nofmt comment filtering#120
andrewbaxter merged 3 commits into
masterfrom
fix-nofmt-comment-filtering

Merge branch 'master' into fix-nofmt-comment-filtering

92ccf6e
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
GitHub Actions / clippy succeeded Oct 29, 2025 in 7s

clippy

359 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 359
Note 0
Help 0

Versions

  • rustc 1.90.0 (1159e78c4 2025-09-14)
  • cargo 1.90.0 (840b83a10 2025-07-30)
  • clippy 0.1.90 (1159e78c47 2025-09-14)

Annotations

Check warning on line 409 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/genemichaels/src/main.rs:409:17
    |
409 |                 return Ok(());
    |                 ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
409 -                 return Ok(());
409 +                 Ok(())
    |

Check warning on line 394 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `FormatConfig` which implements the `Copy` trait

warning: using `clone` on type `FormatConfig` which implements the `Copy` trait
   --> crates/genemichaels/src/main.rs:394:22
    |
394 |         let config = self.config.clone();
    |                      ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
    = note: `#[warn(clippy::clone_on_copy)]` on by default

Check warning on line 388 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/genemichaels/src/main.rs:377:9
    |
377 | /         return FormatPool {
378 | |             log: log.clone(),
379 | |             config: config,
380 | |             pool: {
...   |
387 | |             errors: Arc::new(Mutex::new(vec![])),
388 | |         };
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
377 ~         FormatPool {
378 +             log: log.clone(),
379 +             config: config,
380 +             pool: {
381 +                 let mut p = threadpool::Builder::new();
382 +                 if let Some(t) = thread_count {
383 +                     p = p.num_threads(t);
384 +                 }
385 +                 p.build()
386 +             },
387 +             errors: Arc::new(Mutex::new(vec![])),
388 ~         }
    |

Check warning on line 308 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary use of `into_owned`

warning: unnecessary use of `into_owned`
   --> crates/genemichaels/src/main.rs:308:85
    |
308 | ...                   let entries = match glob::glob(&member.to_string_lossy().into_owned()) {
    |                                                                               ^^^^^^^^^^^^^ help: remove this
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned
    = note: `#[warn(clippy::unnecessary_to_owned)]` on by default

Check warning on line 209 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/genemichaels/src/main.rs:209:21
    |
209 |                     return Ok(());
    |                     ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
209 -                     return Ok(());
209 +                     Ok(())
    |

Check warning on line 205 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/genemichaels/src/main.rs:205:21
    |
205 |                     return Ok(());
    |                     ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
205 -                     return Ok(());
205 +                     Ok(())
    |

Check warning on line 354 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/genemichaels/src/main.rs:354:9
    |
354 |         return Ok(());
    |         ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
354 -         return Ok(());
354 +         Ok(())
    |

Check warning on line 111 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

enclosing `Ok` and `?` operator are unneeded

warning: enclosing `Ok` and `?` operator are unneeded
   --> crates/genemichaels/src/main.rs:111:12
    |
111 |     return Ok(maybe_load_almost_jsonc(path)?.context_with("Path does not exist", ea!(path = path.dbg_str()))?);
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
help: remove the enclosing `Ok` and `?` operator
    |
111 -     return Ok(maybe_load_almost_jsonc(path)?.context_with("Path does not exist", ea!(path = path.dbg_str()))?);
111 +     return maybe_load_almost_jsonc(path)?.context_with("Path does not exist", ea!(path = path.dbg_str()));
    |

Check warning on line 111 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/genemichaels/src/main.rs:111:5
    |
111 |     return Ok(maybe_load_almost_jsonc(path)?.context_with("Path does not exist", ea!(path = path.dbg_str()))?);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
111 -     return Ok(maybe_load_almost_jsonc(path)?.context_with("Path does not exist", ea!(path = path.dbg_str()))?);
111 +     Ok(maybe_load_almost_jsonc(path)?.context_with("Path does not exist", ea!(path = path.dbg_str()))?)
    |

Check warning on line 104 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/genemichaels/src/main.rs:104:17
    |
104 |                 return true;
    |                 ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
104 -                 return true;
104 +                 true
    |

Check warning on line 107 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

enclosing `Ok` and `?` operator are unneeded

warning: enclosing `Ok` and `?` operator are unneeded
   --> crates/genemichaels/src/main.rs:98:12
    |
 98 |       return Ok(
    |  ____________^
 99 | |         serde_json::from_str(
100 | |             &String::from_utf8(body).stack_context(log, "Failed to decode JSON file as utf8")?.lines().filter(|l| {
101 | |                 if l.trim_start().starts_with("//") {
...   |
106 | |         ).stack_context(log, "Failed to parse JSON file")?,
107 | |     );
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
    = note: `#[warn(clippy::needless_question_mark)]` on by default
help: remove the enclosing `Ok` and `?` operator
    |
 98 ~     return serde_json::from_str(
 99 |             &String::from_utf8(body).stack_context(log, "Failed to decode JSON file as utf8")?.lines().filter(|l| {
...
104 |             }).collect::<Vec<&str>>().join("\n"),
105 ~         ).stack_context(log, "Failed to parse JSON file");
    |

Check warning on line 107 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/genemichaels/src/main.rs:98:5
    |
 98 | /     return Ok(
 99 | |         serde_json::from_str(
100 | |             &String::from_utf8(body).stack_context(log, "Failed to decode JSON file as utf8")?.lines().filter(|l| {
101 | |                 if l.trim_start().starts_with("//") {
...   |
106 | |         ).stack_context(log, "Failed to parse JSON file")?,
107 | |     );
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
    |
 98 ~     Ok(
 99 +         serde_json::from_str(
100 +             &String::from_utf8(body).stack_context(log, "Failed to decode JSON file as utf8")?.lines().filter(|l| {
101 +                 if l.trim_start().starts_with("//") {
102 +                     return false;
103 +                 }
104 +                 return true;
105 +             }).collect::<Vec<&str>>().join("\n"),
106 +         ).stack_context(log, "Failed to parse JSON file")?,
107 ~     )
    |

Check warning on line 379 in crates/genemichaels/src/main.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant field names in struct initialization

warning: redundant field names in struct initialization
   --> crates/genemichaels/src/main.rs:379:13
    |
379 |             config: config,
    |             ^^^^^^^^^^^^^^ help: replace it with: `config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
    = note: `#[warn(clippy::redundant_field_names)]` on by default

Check warning on line 127 in crates/aargvark/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> crates/aargvark/src/lib.rs:127:82
    |
127 |                         .map(|a| shell_escape::escape(std::borrow::Cow::Borrowed(&a)))
    |                                                                                  ^^ help: change this to: `a`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 138 in crates/aargvark/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/aargvark/src/lib.rs:138:35
    |
138 |                 VarkRet::Ok(v) => return v,
    |                                   ^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
138 -                 VarkRet::Ok(v) => return v,
138 +                 VarkRet::Ok(v) => v,
    |

Check warning on line 70 in crates/aargvark/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
  --> crates/aargvark/src/lib.rs:70:13
   |
70 |             return Ok(VarkRet::Ok(v));
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
   |
70 -             return Ok(VarkRet::Ok(v));
70 +             Ok(VarkRet::Ok(v))
   |

Check warning on line 54 in crates/aargvark/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
  --> crates/aargvark/src/lib.rs:49:13
   |
49 | /             return Ok(VarkRet::Help(VarkRetHelp {
50 | |                 command: state.command,
51 | |                 args: state.args,
52 | |                 consumed_args: state.i,
53 | |                 builder: builder,
54 | |             }));
   | |_______________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
   |
49 ~             Ok(VarkRet::Help(VarkRetHelp {
50 +                 command: state.command,
51 +                 args: state.args,
52 +                 consumed_args: state.i,
53 +                 builder: builder,
54 ~             }))
   |

Check warning on line 46 in crates/aargvark/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
  --> crates/aargvark/src/lib.rs:42:13
   |
42 | /             return Err(Error {
43 | |                 command: state.command,
44 | |                 args: state.args,
45 | |                 detail: state.errors,
46 | |             });
   | |______________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
   |
42 ~             Err(Error {
43 +                 command: state.command,
44 +                 args: state.args,
45 +                 detail: state.errors,
46 ~             })
   |

Check warning on line 637 in crates/aargvark/src/traits_impls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/aargvark/src/traits_impls.rs:637:9
    |
637 |         return self.0.as_str();
    |         ^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
637 -         return self.0.as_str();
637 +         self.0.as_str()
    |

Check warning on line 631 in crates/aargvark/src/traits_impls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/aargvark/src/traits_impls.rs:631:9
    |
631 |         return self.0;
    |         ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
631 -         return self.0;
631 +         self.0
    |

Check warning on line 629 in crates/aargvark/src/traits_impls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true

warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   --> crates/aargvark/src/traits_impls.rs:629:1
    |
629 | impl Into<String> for NotFlag {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
            https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
    = note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implementation with `From<traits_impls::NotFlag>`
    |
629 ~ impl From<NotFlag> for String {
630 ~     fn from(val: NotFlag) -> Self {
631 ~         return val.0;
    |

Check warning on line 625 in crates/aargvark/src/traits_impls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/aargvark/src/traits_impls.rs:625:9
    |
625 |         return &self.0;
    |         ^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
625 -         return &self.0;
625 +         &self.0
    |

Check warning on line 617 in crates/aargvark/src/traits_impls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/aargvark/src/traits_impls.rs:617:9
    |
617 |         return self.0.clone();
    |         ^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
617 -         return self.0.clone();
617 +         self.0.clone()
    |

Check warning on line 619 in crates/aargvark/src/traits_impls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

direct implementation of `ToString`

warning: direct implementation of `ToString`
   --> crates/aargvark/src/traits_impls.rs:615:1
    |
615 | / impl ToString for NotFlag {
616 | |     fn to_string(&self) -> String {
617 | |         return self.0.clone();
618 | |     }
619 | | }
    | |_^
    |
    = help: prefer implementing `Display` instead
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
    = note: `#[warn(clippy::to_string_trait_impl)]` on by default

Check warning on line 611 in crates/aargvark/src/traits_impls.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> crates/aargvark/src/traits_impls.rs:611:9
    |
611 |         return HelpPattern(vec![HelpPatternElement::Type("STRING".to_string())]);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
611 -         return HelpPattern(vec![HelpPatternElement::Type("STRING".to_string())]);
611 +         HelpPattern(vec![HelpPatternElement::Type("STRING".to_string())])
    |