Skip to content

Commit 36057b4

Browse files
hsbtclaude
andcommitted
Fix rubocop configuration not being loaded
rubocop 1.86.0 prioritizes ~/.config/rubocop/config.yml over the project's .rubocop.yml, causing all project settings to be ignored. Explicitly specify the config file in the Rake task to work around this. Also update rubocop-performance from require to plugins directive, as required by rubocop-performance 1.24+. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 875d129 commit 36057b4

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.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

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: rubocop 1.86.0 prioritizes ~/.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)