diff --git a/.rubocop.yml b/.rubocop.yml index fcba6ffedbc..1d351c842af 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -345,3 +345,8 @@ Lint/MissingSuper: Rails/FindEach: Exclude: - 'db/migrate/**/*' + +# Since we're writing library code we can't assume that +# tasks should load the rails environment loaded. +Rails/RakeEnvironment: + Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9eb52acaab2..a581319b805 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -459,16 +459,6 @@ Rails/Present: - "core/lib/spree/core/search/base.rb" - "core/spec/models/spree/stock/availability_validator_spec.rb" -# Offense count: 8 -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: Include. -# Include: **/Rakefile, **/*.rake -Rails/RakeEnvironment: - Exclude: - - "Rakefile" - - "backend/Rakefile" - - "core/Rakefile" - # Offense count: 8 # This cop supports safe autocorrection (--autocorrect). Rails/RedundantForeignKey: