Skip to content

Commit b99b67a

Browse files
authored
Merge pull request #429 from rubygems/fixup-rubocop-configuration
Fix rubocop configuration not being loaded
2 parents 0923e9d + 5ba3146 commit b99b67a

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ jobs:
1717
ruby-version: 3.3
1818
bundler-cache: true # 'bundle install' and cache
1919
- name: Rubocop
20-
run: bundle exec rubocop
20+
run: bundle exec rake rubocop
2121

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
inherit_from: .rubocop-bundler.yml
2-
require:
2+
plugins:
33
- rubocop-performance
44
AllCops:
55
NewCops: disable

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ platform :ruby do
2424
end
2525

2626
group :linting do
27-
gem "rubocop", "~> 1.44"
28-
gem "rubocop-performance", "~> 1.5"
27+
gem "rubocop", "~> 1.72"
28+
gem "rubocop-performance", "~> 1.24"
2929
end
3030

3131
group :test do

Rakefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ require "bundler/gem_tasks"
44
require "rspec/core/rake_task"
55
require "rubocop/rake_task"
66

7-
RuboCop::RakeTask.new
7+
# Workaround: some rubocop versions prioritize ~/.config/rubocop/config.yml
8+
# over the project's .rubocop.yml, so we explicitly specify the config file.
9+
RuboCop::RakeTask.new do |t|
10+
t.options = %w[-c .rubocop.yml]
11+
end
812

913
desc "Run specs"
1014
RSpec::Core::RakeTask.new(:spec) do |t|

0 commit comments

Comments
 (0)