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
Ability to set a version identifier for NewCops #8249
Comments
I think that's a great idea and implementing it would not be hard. We might be able to squeeze this in before the 1.0 release. |
Would or wouldn't be hard? :) |
wouldn't :-) |
RuboCop Core, RuboCop Performance, RuboCop Rails, each version is out of sync. |
RuboCop warns about the cops introduced with Imagine you update from 1.0.0 to 1.1.0 and You have two options:
Will this work for you? |
It's possible to make |
If the workflow fits you, I encourage you to describe it by adding a section to https://github.com/rubocop-hq/rubocop/blob/master/docs/modules/ROOT/pages/versioning.adoc |
@connorshea Can you please provide your feedback regarding my proposal on how to deal with your use case above. Hope you'll consider that adding a new feature means increased maintenance costs. |
@pirj your proposal makes sense to me. My main goal is just to avoid editing my rubocop config as much as possible, but I acknowledge that the maintenance burden trade-off there falls entirely on the rubocop team. Since it's non-trivial due to the rubocop extensions, I'm fine with abandoning this idea. Thank you for considering it, though! |
@connorshea Thanks for understanding! |
Is your feature request related to a problem? Please describe.
I want to enable all the new pending cops released so far, but I don't want to opt into pending cops that will be released in future Rubocop releases.
Describe the solution you'd like
I want to be able to set this in my
.rubocop.yml
:And then all pending cops introduced up to (and including) version
0.87
would be enabled, but when 0.88.0 comes out it won't enable any new pending cops by default, and my CI will pass without anyone needing to manually intervene in any way.The syntax could also be
<= 0.87
or something, I'm not picky.Essentially, I want both of these things:
.rubocop.yml
.Describe alternatives you've considered
Just enabling all the relevant new cops one-by-one in my
.rubocop.yml
or just usingNewCops: enabled
, but neither are really very convenient.Additional context
I'm not sure if this can be done with existing information in the gem (I think cops already have metadata for when they were introduced?) or if this'd add some new maintenance burden. If it'd add maintenance burden beyond just the initial code to make this work, then it's probably not a big enough deal to bother.
Thanks for the work on Rubocop, I really like the new pending system! :)
The text was updated successfully, but these errors were encountered: