Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pin rubocop to 1.12 due to error with ruby 2.4
Rubocop 1.13 was released today (2021-04-20) and it has dropped support for Ruby 2.4[1][2]. This causes rubocop to die on the spot when trying to run it: $ bundle exec rubocop --version 1.13.0 $ bundle exec rubocop Error: RuboCop found unsupported Ruby version 2.4 in `TargetRubyVersion` parameter (in .rubocop.yml). 2.4-compatible analysis was dropped after version 1.12. Supported versions: 2.5, 2.6, 2.7, 3.0 And thus the "style_check" ci job is currently broken[3]. Rubocop 1.10 and 1.11 don't work either because of a rename: $ bundle exec rubocop Error: unrecognized cop Style/StringChars found in .rubocop.yml Did you mean `Style/StringMethods`? Also, for some reason bundler installs rubocop 1.13 even with the current "~> 1.10" specification. This happens both on my machine (Artix Linux; ruby 3.0.1p64; rubygems 3.2.15; bundler 2.2.16) and on GitHub Actions (Ubuntu 20.04; ruby 2.5; rubygems ?; bundler 2.2.16)[3]. So pin rubocop to the 1.12 series using the usual >= and < operators. Example of another project doing something similar: [4]. Fixes jekyll#8649. [1] https://github.com/rubocop/rubocop/releases/tag/v1.13.0 [2] rubocop/rubocop#9648 [3] https://github.com/jekyll/jekyll/runs/2394239794?check_suite_focus=true [4] Shopify/job-iteration#79
- Loading branch information