Run nightly Clippy over the Ruff repo#5670
Conversation
| ) | ||
| .chain( | ||
| // Include all star imports. | ||
| block.import_from_star.into_iter(), |
There was a problem hiding this comment.
(Calling .into_inter() on a method that accepts IntoIter.)
zanieb
left a comment
There was a problem hiding this comment.
Seems reasonable. It'd be cool to automate this but if it can't autofix most of the violations it seems tricky.
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinuxWindows |
|
Eventually these rules will make it out of nightly and into subsequent Rust releases, at which point we'll be able to incorporate them into our existing Clippy checks for free :) |
|
Uhm what. No approve button on github mobile 🧐 Approve |
It's hidden inside the file section > "Review Changes" button ;) |
MichaReiser
left a comment
There was a problem hiding this comment.
Damn, I never hit Submit on these comments
| } | ||
| SerializationFormat::Junit => { | ||
| JunitEmitter::default().emit(writer, &diagnostics.messages, &context)?; | ||
| JunitEmitter.emit(writer, &diagnostics.messages, &context)?; |
There was a problem hiding this comment.
Hmm, this will be somewhat annoying if we ever add instance fields. You then need to update all usages.
| >; | ||
| fn into_format(self) -> Self::Format { | ||
| FormatOwnedWithRule::new(self, crate::module::mod_module::FormatModModule::default()) | ||
| FormatOwnedWithRule::new(self, crate::module::mod_module::FormatModModule) |
There was a problem hiding this comment.
I wouldn't change the generated file. Some rules have fields and thus require using default. Having different usages for different rules will make it annoying to generate the code
Or is calling default explicitly not required?
There was a problem hiding this comment.
I'm gonna revert the generated changes. See #5804 for why
Summary
This is the result of running
cargo +nightly clippy --workspace --all-targets --all-features -- -D warningsand fixing all violations. Just wanted to see if there were any interesting new checks on nightly 👀