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
Require RuboCop 0.89 or higher #86
Conversation
Follow github#73. `Lint/BinaryOperatorWithIdenticalOperands` cop has introduced by RuboCop 0.89.0 and RuboCop GitHub uses the cop. rubocop/rubocop@d94c4a4 This PR prevents the following error when using RuboCop 0.88 or lower. ```console % bundle exec rake (snip) Running RuboCop... Error: unrecognized cop Lint/BinaryOperatorWithIdenticalOperands found in config/_default_shared.yml RuboCop failed! ```
Follow rubocop/rubocop#7868. The legacy `Cop::Cop` API is soft deprecated and this PR use new `Cop::Base` API instead. > maintain any RuboCop extensions, as the legacy API will be removed in > RuboCop 2.0. https://metaredux.com/posts/2020/10/21/rubocop-1-0.html This new API requires RuboCop 0.87 or higher. https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md#0870-2020-07-06 Denpendency version of `s.add_dependency "rubocop"` does not need to be updated in the gemspec if github#86 has been merged first.
Thanks for the PR! The README for this project says:
I don't think this comment quite makes sense after this PR, nor do the "legacy" configuration files. Maintaining multiple versions of the config file doesn't seem to be working that well for us (as evidenced by the (No pressure for you to actually do this work. I'm just thinking out loud about what should probably be done to merge this.) |
These constraints make it more difficult to upgrade these libraries in projects that use rubocop-github. I think the idea here was that we'd be able to bump the version alongside the default config, but without locking to an exact version we can still end up with a config that is incompatible with certain rubocop version (see the unrecognized cop error in #86, for example). If anything, I'd prefer a `>=` constraint over a `<=`. That would allow us to bump the minimum constraint when we add new cops, but still freely upgrade in our projects as long as there are no config incompatibilities (which are less common anyway ever since RuboCop 1.0).
Maintaining a separate "edge" config and "legacy" config probably served us well back around the time we were migrating to rubocop 0.68, it's not working well for us anymore. Things changed often before rubocop 1.0, and there are versions out there that don't work perfectly with either of these configs (see #86, for example). This commit sets a version constraint for rubocop ">= 1.0.0" and deletes the `*_deprecated.yml` files that only worked with rubocop > 0.68. With the deprecated files deleted, it also consolidates the remaining files into default.yml and rails.yml.
Maintaining a separate "edge" config and "legacy" config probably served us well [back around the time we were migrating to rubocop 0.68](d533765), but it's not working well for us anymore. Things changed often before rubocop 1.0, and there are versions out there that don't work perfectly with either of these configs (see #86, for example). This commit sets a version constraint for rubocop ">= 1.0.0" and deletes the `*_deprecated.yml` files that only worked with rubocop < 0.68. With the deprecated files deleted, it also consolidates the remaining files into default.yml and rails.yml.
Maintaining a separate "edge" config and "legacy" config probably served us well [back around the time we were migrating to rubocop 0.68](d533765), but it's not working well for us anymore. Things changed often before rubocop 1.0, and there are versions out there that don't work perfectly with either of these configs (see #86, for example). This commit sets a version constraint for rubocop ">= 1.0.0" and deletes the `*_deprecated.yml` files that only worked with rubocop < 0.68. With the deprecated files deleted, it also consolidates the remaining files into default.yml and rails.yml.
Bumped to >= 1.0.0 in #101 |
Follow rubocop/rubocop#7868. The legacy `Cop::Cop` API is soft deprecated and this PR use new `Cop::Base` API instead. > maintain any RuboCop extensions, as the legacy API will be removed in > RuboCop 2.0. https://metaredux.com/posts/2020/10/21/rubocop-1-0.html This new API requires RuboCop 0.87 or higher. https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md#0870-2020-07-06 Denpendency version of `s.add_dependency "rubocop"` does not need to be updated in the gemspec if github#86 has been merged first.
Follow #73.
Lint/BinaryOperatorWithIdenticalOperands
cop has introduced by RuboCop 0.89.0 and RuboCop GitHub uses the cop.rubocop/rubocop@d94c4a4
This PR prevents the following error when using RuboCop 0.88 or lower.