-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rustfix support from rustc (rough rustc copy) #151
Conversation
I noticed that this changes the stderr output to JSON in general: https://travis-ci.org/rust-lang/rust-clippy/jobs/465644097#L991 If it's desired, I can try to change this back to the pretty output for terminals and just using JSON for rustfix. This would need to be done in Rust's compiletest, too and maybe it makes sense to do it in a second step. |
Additionally noting that I left out some switches about NLL compare modes that were tied together with rustfix. |
Hi @phansch Sorry for my tardiness on this!
If it doesn't interfere with existing users' ability to just update, I think we're OK. When creating the
Well, I think rust-lang/rust-clippy#3519 speaks for itself :-)
My only question is: would this break existing users if they update? If so, I think we should take steps to prevent the output from changing. Otherwise, I don't see a problem and agree that we could handle it in a second step. |
Re testing: You could add new tests to the |
Thanks for your feedback!
I will actually need to check if it compiles on stable, otherwise we would have to put it behind the stable feature 👍
Yes. This is currently a bug (?) in rustc as well I think. I'm going to add some rustfix tests to the test project. That should also make it easier to try and preserve the human readable output and getting fixes into rust. |
Thanks! |
Thank you and happy new year 🎇 |
@laumann if you could publish a new release, that would be great =) |
@phansch Yes, of course! And a happy New Year to you as well 🎉 |
Integrate rustfix into Clippy test suite Once the [PR to compiletest-rs](Manishearth/compiletest-rs#151) is reviewed and merged this fixes #2376. I will create a separate tracking issue for adding `run-rustfix` to all tests.
@laumann Thanks for the release! That should make Clippy suggestions much more reliable in the future and paves the way for proper Clippy<->Rustfix integration 🎇 |
This adds rustfix integration that was already present in the compiletest of
rustc. We would like to use this in Clippy to be able to test that all
suggestions can be applied by rustfix and that the changes are compiling as
well. This would probably also benefit other tools that make use of lints.
Associated Clippy PR that uses this branch: rust-lang/rust-clippy#3519
Some open questions: