-
Notifications
You must be signed in to change notification settings - Fork 10
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
Run Rubocop
as part of a different job
#74
Conversation
Also only run `rubocop` against `Ruby 3.4`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Thank you! ❤️
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.4' | ||
bundler-cache: true | ||
|
||
- name: Lint code for consistent style | ||
run: bundle exec rubocop -f github |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although it's supposed that new cops are not enabled by default when introduced between major versions, I'm a little worried about the CI suddenly starting to fail as rubocop
keeps releasing new versions – perhaps we could open up a separate PR to start tracking the Gemfile.lock
again to ensure that we always get the same version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we could do that!
The Gemfile.lock
only needs to support the latest Ruby
version, right? We don't have to worry about EOL Ruby
versions, do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly!
Summary
rubocop
constraint from0.80.1
to~> 1
rubocop
in a different job againstRuby 3.4