Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Add a --clippy option #213

Closed
jyn514 opened this issue Aug 11, 2022 · 3 comments
Closed

Add a --clippy option #213

jyn514 opened this issue Aug 11, 2022 · 3 comments

Comments

@jyn514
Copy link
Member

jyn514 commented Aug 11, 2022

Right now, there are two main interfaces for running fixes:

  1. `cargo fix [--tests|--benches|--lib]
  2. cargo clippy --fix

It's weird that they are so different - I would expect this to be a cargo fix --clippy option. Would it be possible for rustfix to add support so we can unify the interface?

cc @rust-lang/clippy

@flip1995
Copy link
Member

flip1995 commented Aug 11, 2022

Aren't those flags completely handled by cargo?

I seem to remember that we had this discussion before in the cargo repo. I think it was in the context of making the clippy subcommand a first class citizen of cargo instead of having it as an external tool that adds this subcommand (which was rejected back then, because Clippy doesn't have to be installed). Having Clippy as a first class citizen would have had the advantage that cargo could also handle things like cargo fix --clippy. But since Clippy has to register itself as a subcommand, we also had to implement the --fix flag on our own.

This is the PR were this discussion took place: rust-lang/cargo#7382 (warning: it's really long!)

And here is the PR that tried adding cargo fix --clippy: rust-lang/cargo#7383

@jyn514
Copy link
Member Author

jyn514 commented Aug 11, 2022

Thanks for the link! Yes, that would be a cargo change. I commented on the PR :)

@ehuss
Copy link
Collaborator

ehuss commented May 11, 2023

Closing as this isn't related to the rustfix library. I commented on the linked PR for the reasoning.

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants