From c33fc67bd756687b23d16b3871b5a1bc0d73b7dc Mon Sep 17 00:00:00 2001 From: Klaus Zanders Date: Tue, 7 Apr 2026 09:20:23 +0200 Subject: [PATCH 1/2] Remove spec/.rubocop.yml and put proper exclusions in main config --- .rubocop.yml | 11 +++++++++++ spec/.rubocop.yml | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 spec/.rubocop.yml diff --git a/.rubocop.yml b/.rubocop.yml index 1bd67f59709..00bb60d7954 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -190,6 +190,9 @@ Rails/FindEach: - limit - select - lock + Exclude: + - 'spec/**/*' + - 'modules/**/spec/**/*' # The http verbs in Rack::Test do not accept named parameters (params: params) Rails/HttpPositionalArguments: @@ -219,6 +222,9 @@ Rails/RequireDependency: # Require save! to prevent saving without validation when saving outside of a condition. Rails/SaveBang: Enabled: true + Exclude: + - 'spec/**/*' + - 'modules/**/spec/**/*' # There are valid cases in which to use methods like: # * update_all @@ -475,6 +481,11 @@ Style/Proc: Style/RaiseArgs: Enabled: false +Style/RescueModifier: + Exclude: + - 'spec/**/*' + - 'modules/**/spec/**/*' + Style/RegexpLiteral: Enabled: false diff --git a/spec/.rubocop.yml b/spec/.rubocop.yml deleted file mode 100644 index ff1f8b1ad6d..00000000000 --- a/spec/.rubocop.yml +++ /dev/null @@ -1,10 +0,0 @@ -inherit_from: ../.rubocop.yml - -Style/RescueModifier: - Enabled: false - -Rails/FindEach: - Enabled: false - -Rails/SaveBang: - Enabled: false From 2b9d3f2cb7394dfee368489b56763a78117655cf Mon Sep 17 00:00:00 2001 From: Klaus Zanders Date: Tue, 7 Apr 2026 09:23:51 +0200 Subject: [PATCH 2/2] Also add module specs to other exclusions in rubocop.yml file --- .rubocop.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 00bb60d7954..bd3ab0508f8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -191,8 +191,8 @@ Rails/FindEach: - select - lock Exclude: - - 'spec/**/*' - - 'modules/**/spec/**/*' + - "spec/**/*" + - "modules/**/spec/**/*" # The http verbs in Rack::Test do not accept named parameters (params: params) Rails/HttpPositionalArguments: @@ -204,11 +204,13 @@ Rails/I18nLocaleAssignment: Enabled: true Exclude: - "spec/**/*.rb" + - "modules/*/spec/**/*.rb" Rails/I18nLocaleTexts: Enabled: true Exclude: - "spec/**/*.rb" + - "modules/*/spec/**/*.rb" # We have config.active_record.belongs_to_required_by_default = false , # which means, we do have to declare presence validators on belongs_to relations. @@ -223,8 +225,8 @@ Rails/RequireDependency: Rails/SaveBang: Enabled: true Exclude: - - 'spec/**/*' - - 'modules/**/spec/**/*' + - "spec/**/*" + - "modules/**/spec/**/*" # There are valid cases in which to use methods like: # * update_all @@ -483,8 +485,8 @@ Style/RaiseArgs: Style/RescueModifier: Exclude: - - 'spec/**/*' - - 'modules/**/spec/**/*' + - "spec/**/*" + - "modules/**/spec/**/*" Style/RegexpLiteral: Enabled: false