You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been testing clippy --fix since #5363 got merged, and it's working great ❤️.
I've been thinking on integrating it into my editor similar to how rustfmt runs when I save a file.
Currently, clippy --fix fixes all issues in a project. Running clippy against a single file isn't useful (or supported), since it needs the context of a single crate to be able to report certain problems (e.g. unused variables, etc).
However, a combination of "check entire crate", combined with "apply fixes for this one file", would make it possible to integrate Clippy in an editor by applying fixes to the active file, while still checking the entire crate for contextual information it needs.
I'm curious if this is something that sounds interesting to pursuit. I'm not sure what the UX around this feature would be, but I guess it would be to provide --fix, and also some kind of repeatable --fix-file to fix any issues in one or more files?
The text was updated successfully, but these errors were encountered:
I think this would have to be implemented in cargo though, since Clippy doesn't really do anything when run with --fix, except running cargo fix with Clippy enabled.
I've been testing
clippy --fix
since #5363 got merged, and it's working great ❤️.I've been thinking on integrating it into my editor similar to how
rustfmt
runs when I save a file.Currently,
clippy --fix
fixes all issues in a project. Running clippy against a single file isn't useful (or supported), since it needs the context of a single crate to be able to report certain problems (e.g. unused variables, etc).However, a combination of "check entire crate", combined with "apply fixes for this one file", would make it possible to integrate Clippy in an editor by applying fixes to the active file, while still checking the entire crate for contextual information it needs.
I'm curious if this is something that sounds interesting to pursuit. I'm not sure what the UX around this feature would be, but I guess it would be to provide
--fix
, and also some kind of repeatable--fix-file
to fix any issues in one or more files?The text was updated successfully, but these errors were encountered: