From e1b4edf803faefdb49438efaf92d164917a3081e Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Mon, 18 Dec 2023 16:59:46 +0100 Subject: [PATCH] Disable the Rails/RakeEnvironment cop We're not writing application code in which it's ok to assume that all tasks should load the environment first. --- .rubocop.yml | 5 +++++ .rubocop_todo.yml | 10 ---------- 2 files changed, 5 insertions(+), 10 deletions(-) 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: