Skip to content

Conversation

drwl
Copy link
Contributor

@drwl drwl commented Jun 14, 2022

This PR pins Rubocop to the last version that's supported by Ruby 2.5. I think it was improperly pinned/Rubocop's versioning went different than expected.

  • The lint step was running Ruby 2.5 and as a result was using Rubocop 1.28.2.
  • In the gemfile, gem "rubocop", "~> 1.21" allows for any versions < 2.
  • As a result, there's most likely drift between people's Rubocop version and the one used in the lint step.
  • Rubocop 1.29.0 is the first version that sets the requirement for Ruby 2.6+.

Some PRs are experiencing unrelated linting issues. I don't have the context to safely make these changes, but this change should unblock folks.

@drwl
Copy link
Contributor Author

drwl commented Jun 14, 2022

It's not clear why the lint step is failing:

https://github.com/httprb/http/runs/6890611978?check_suite_focus=true

Run bundle exec rubocop --format progress --color
Your RubyGems version (2.7.6.3) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3`
Error: unrecognized cop or department Gemspec/DeprecatedAttributeAssignment found in .rubocop_todo.yml
Did you mean `Gemspec/OrderedDependencies`?
Error: Process completed with exit code 2.

Locally this passes for me

➜  httprb-gem git:(drwl/fix-rubocop-issues) ✗ bundle exec rubocop --format progress --color
Inspecting 80 files
................................................................................

80 files inspected, no offenses detected

@drwl drwl changed the title Run rubocop --auto-gen-config Fix the pinning of Rubocop version Jun 14, 2022
@drwl
Copy link
Contributor Author

drwl commented Jun 14, 2022

@tarcieri I'm not able to request reviewers, but this should fix the failed linting step in various PRs.

@drwl
Copy link
Contributor Author

drwl commented Jun 16, 2022

cc @ixti

@ixti ixti self-requested a review June 16, 2022 12:49
@tarcieri tarcieri merged commit 8f84942 into httprb:main Jun 16, 2022
@tarcieri
Copy link
Member

Thanks!

@ixti
Copy link
Member

ixti commented Jun 16, 2022

LOL I guess I'm too late for the review :D

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