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

Upgrade to rubocop 1.x #57

Merged
merged 4 commits into from
Feb 23, 2022
Merged

Upgrade to rubocop 1.x #57

merged 4 commits into from
Feb 23, 2022

Conversation

cjcolvar
Copy link
Member

@cjcolvar cjcolvar commented Feb 4, 2022

Being stuck on an old version of rubocop is blocking allowing ruby 3.0+ in gems using bixby. With the release of rubocop 1 it has adopted semantic versioning which means that new cops will not be enabled until the next major release. This is why I've allowed any version of 1.x rubocop in the gemspec.

I think it is worth revisiting #32 and see if there is enough energy to continue maintaining community style defaults or if the main goal of this gem has been fulfilled with the release of rubocop 1.0.

@cla-bot cla-bot bot added the cla-signed label Feb 4, 2022
@cjcolvar cjcolvar marked this pull request as ready for review February 4, 2022 16:58
@no-reply
Copy link

does bixby want a version bump with this? 4.0.0?

@cjcolvar
Copy link
Member Author

@no-reply I would expect that it would need a major version bump due to the required ruby version even if the rubocop rules don't change (which I expect they might slightly).

If we're doing a major version then it would be good to try and clean things up a bit at the same time:

  • Removing unnecessary configuration based upon my analysis
  • Reevaluating other rules like max line length
  • Any other work necessary for promotion out of labs to core

bixby_default.yml Outdated Show resolved Hide resolved
@@ -795,7 +795,7 @@ Lint/UselessAccessModifier:
Lint/UselessAssignment:
Enabled: true

Lint/UselessComparison:
Lint/BinaryOperatorWithIdenticalOperands:
Copy link
Member Author

Choose a reason for hiding this comment

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

This cop's name changed.

Comment on lines +4 to +5
RSpec:
Include:
Copy link
Member Author

Choose a reason for hiding this comment

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

rubocop-rspec moved and renamed this property.

@@ -25,7 +24,6 @@ RSpec/DescribeMethod:

RSpec/EmptyExampleGroup:
Enabled: true
CustomIncludeMethods: []
Copy link
Member Author

Choose a reason for hiding this comment

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

This property is no longer supported by this cop.

spec.add_dependency 'rubocop-ast', '~> 0.3.0'
spec.required_ruby_version = '>= 2.6'

spec.add_dependency 'rubocop', '>= 1', '< 2'
Copy link
Member Author

Choose a reason for hiding this comment

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

Should this use ~> instead?

Suggested change
spec.add_dependency 'rubocop', '>= 1', '< 2'
spec.add_dependency 'rubocop', '~> 1.0'

# Rubocop version, we will want to revisit this dependency. Either
# changing the version range OR removing it.
spec.add_dependency 'rubocop-ast', '~> 0.3.0'
spec.required_ruby_version = '>= 2.6'
Copy link
Member Author

Choose a reason for hiding this comment

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

Rubocop required setting this to match the TargetRubyVersion in the rubocop config.

@@ -0,0 +1 @@
inherit_from: bixby_default.yml
Copy link
Member Author

Choose a reason for hiding this comment

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

Eat our own dog food. 🐶

@@ -162,9 +162,6 @@ Style/MethodCallWithoutArgsParentheses:
Style/MethodDefParentheses:
Enabled: true

Style/MethodMissingSuper:
Copy link
Member Author

Choose a reason for hiding this comment

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

This cop changed to Lint/MissingSuper

@jrgriffiniii jrgriffiniii merged commit 0d06099 into main Feb 23, 2022
@jrgriffiniii jrgriffiniii deleted the rubocop1 branch February 23, 2022 17:12
@jrgriffiniii jrgriffiniii restored the rubocop1 branch February 23, 2022 17:13
jrgriffiniii added a commit that referenced this pull request Feb 24, 2022
jrgriffiniii added a commit that referenced this pull request Feb 28, 2022
cjcolvar added a commit that referenced this pull request Mar 2, 2022
@cjcolvar cjcolvar mentioned this pull request Mar 2, 2022
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.

3 participants