Run Rubocop as part of a different job#74
Merged
nicolastemciuc merged 2 commits intomasterfrom Feb 21, 2025
Merged
Conversation
Also only run `rubocop` against `Ruby 3.4`
santiagorodriguez96
approved these changes
Feb 21, 2025
Contributor
santiagorodriguez96
left a comment
There was a problem hiding this comment.
Love it! Thank you! ❤️
Comment on lines
+13
to
+27
| 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 |
Contributor
There was a problem hiding this comment.
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?
Member
Author
There was a problem hiding this comment.
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rubocopconstraint from0.80.1to~> 1rubocopin a different job againstRuby 3.4