-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Pending cops #369
Comments
I don't see how this can happen without RuboCop keeping track of its past invocations. I think that the autocorrect feature we're currently working on should solve your problems, since you'll be able to update big chunks of code fairly quickly that way. Right now @edzhelyov is cooking a lot of improvements in the autocorrect department. |
I was envisaging it being like "pending" in RSpec: https://github.com/dchelimsky/rspec/wiki/Pending-Examples
So for example if I have
then if I run Rubocop, and it finds a redundant return, then it won't report anything. But if I run Rubocop, and it doesn't find a redundant return, it'd say something like "RedundantReturn is marked as pending, but there are no redundant returns in the application. Set this cop to Enabled: true". Is what I'm trying to say more clear now? |
What if RuboCop could generate configuration that disables all cops that have anything to report? That configuration file would server as a list of things to work through, and I think that solves your use case of having an overwhelming amount of reports in an old code base. I would prefer it for two reasons:
It would lack the functionality you describe of reporting that some offence has now been removed, but I imagine that people would use the generated configuration as a todo list, removing the disabling one by one, or sometimes regenerating the list. It would tackle the overwhelming heap of reports effectively, I think. |
"Sometimes regenerating the list" would work for me. |
I tried out DisabledConfigFormatter, and it works well. |
For many of the style guide suggestions, I find that I agree with them, but past-self failed to abide by them. Is it possible for cops to act as if they're disabled, except that they report if the code is now clean?
The text was updated successfully, but these errors were encountered: