diff --git a/.rubocop.yml b/.rubocop.yml index 1bd67f59709..bd3ab0508f8 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: @@ -201,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. @@ -219,6 +224,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 +483,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