rust-lang/rustfix

Include clippy?

Closed this issue · 3 comments

rustfix is far more useful when it can use clippy's lints, so it might be a good idea to include clippy in rustfix itself.

Advantages:

  • ≥150 more lints, many with suggestions we can tap into
  • No need to tell people to install cargo clippy
  • No need to always write rustfix --clippy (which most user would probably need to do otherwise)

Disadvantages:

  • We depend on clippy
  • Clippy depends on specific versions of rust nightly, as does serde (which we already depend on)
  • We might need to update far more often

Unclear:

  • We might just need to copy/include the code from the cargo-clippy binary

Alternatives:

  • Set --clippy by default and tell people (with a nice error message) to install it
  • rustfix could also become a part of cargo clippy

You may want to 'include' clippy as an optional feature.

Alternatively, rustfix could also just become a part of cargo clippy (also added above)

@shepmaster also mentioned he'd like cargo clippy --fix