Skip to content
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

Update to rubocop 1.13.0 and re-enable Bundler/GemComment. #44

Merged
merged 6 commits into from Jul 7, 2021

Conversation

ric2b
Copy link
Contributor

@ric2b ric2b commented Jun 22, 2021

(as part of this jira ticket)

Follow up to #41, as rubocop/rubocop#9358 was merged and released as part of rubocop 1.13.0.

Not that I agree that >= x version specifiers don't deserve an explanation (someone might want to know, if they'd like to downgrade for another reason) but I'm not dying on this hill 😛

(Meant for https://github.com/salsify/con-u/pull/1752)

prime: @jturkel
cc: @erikkessler1, @donbonifacio, @beardman

@ric2b ric2b self-assigned this Jun 22, 2021
@@ -1,3 +1,7 @@
require:
- rubocop-performance
- rubocop-rails
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we need this change? If we do need it, should the rubocop-rails require go in rubocop_rails.yml?

Copy link
Contributor Author

@ric2b ric2b Jun 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jturkel The need for this is that otherwise we get these errors:
image

As for moving require: rubocop-rails to rubocop_rails.yml, the issue is that this file has the following lines:

Rails:
Enabled: false

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this gem depends on rubocop-rails even if the project isn't using Rails so this should be innocuous.

@ric2b ric2b force-pushed the reenable-bundler-gemcomment branch from 8dd2369 to bbd011e Compare June 24, 2021 20:53
@ric2b
Copy link
Contributor Author

ric2b commented Jun 24, 2021

Wow, took me quite a while to realize that the tests themselves had suffered breaking changes and had to be updated in conjunction with our custom cops!

Not a fun time, I was getting very frustrated trying to fix the custom cops and the error messages weren't helpful at all.

Anyway, it was documented: https://docs.rubocop.org/rubocop/v1_upgrade_notes.html#upgrading-specs
Not sure why we didn't run into it before since it was a change in v1.

@ric2b ric2b requested a review from jturkel June 24, 2021 20:54
@ric2b ric2b changed the title Re-enable version specifier checks for the Bundler/GemComment cop. Update to rubocop 1.13.0 and re-enable Bundler/GemComment. Jun 24, 2021
.rubocop.yml Outdated
@@ -2,7 +2,7 @@ inherit_from:
- conf/rubocop.yml

AllCops:
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be bump this (and the minimum Ruby version in the gemspec) to Ruby 2.6 since Ruby 2.5 is EOL now?

@@ -1,3 +1,7 @@
require:
- rubocop-performance
- rubocop-rails
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this gem depends on rubocop-rails even if the project isn't using Rails so this should be innocuous.

@ric2b ric2b force-pushed the reenable-bundler-gemcomment branch from 694af55 to 75c1c64 Compare July 5, 2021 07:38
@ric2b ric2b merged commit 0add0c2 into master Jul 7, 2021
@ric2b ric2b deleted the reenable-bundler-gemcomment branch July 7, 2021 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants