-
Notifications
You must be signed in to change notification settings - Fork 62
Apply only certain fixes #36
Comments
Yes, whitelisting is certainly something we should add to ensure that casual users only ever get suggestions that work! I think it'd be good to hard-code some known-good-lints and only apply these unless the user sets Would you like to work on? I think a good first PR would add the whitelist and then |
I want to +1 the ability to only automatically fix a single specific lint at a time.
I read the original comment as something different. Your comment seems to be focused on "safe" vs "scary" fixes. That's also sounds useful, but I don't think it's this issue. My preferred workflow when introducing new lints to an existing code base is:
At this point, I commit and push this progress. This prevents any files from getting worse. Then, the team cycles on the following steps:
What's interesting to note is that this entire process usually repeats when a new version of the linting tool is released, as this often introduces new lints that we have been unknowingly violating. When something is automatic, I want to fix it, then manually perform a This is strongly influenced by RuboCop. |
@shepmaster sorry if my last comment was confusing! I was thinking about the implementation of the whitelist, and that we can use its default value to show which lint suggestions we consider to be stable. Also: Thanks for reminding me to look to get #37 merged :) |
Ok, and it sounds like that's something else besides this issue (which sounds correct to me). Is there a link to the issue for the whitelist you are thinking about? |
I'm not sure there is one, probably just some comments on the PR. I've been slacking maintaining rustfix for a while and should probably write up some plans. Feel free to open new issues for every weird thing you encounter in the meantime :)
… Am 20.10.2017 um 18:15 schrieb Jake Goulding ***@***.***>:
I was thinking about the implementation of the whitelist
Ok, and it sounds like that's something else besides this issue (which sounds correct to me). Is there a link to the issue for the whitelist you are thinking about?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
FYI rust-lang/rust#45484 just landed which makes identifying lint names in diagnostic output way easier |
I can not find any docs about functionality
applying only certain fixes
,so here is feature request: it would be nice to filter possible fixes and applying only some classes of them.
For example, during development phase you can have bunch of warning
unused something
,this is ok on development stage, but should be fixed on stabializing feature stage.
Also, for example I read about
rustfix
here and would like to try to fixuse
issues, but only for them.So, it would be great to have something like
--ignore-class=unused
and--apply-only-for-class=use
command line arguments.The text was updated successfully, but these errors were encountered: