diff --git a/.rubocop.yml b/.rubocop.yml index d7f870235..e16f8dbcd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -146,6 +146,9 @@ Rails/EnvironmentVariableAccess: Rails/FilePath: Enabled: false +Rails/FindEach: + Enabled: false + Rails/HelperInstanceVariable: Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a3c419380..ec34bc33b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -566,23 +566,6 @@ Rails/Exit: - 'config/initializers/10-patches.rb' - 'config/routes.rb' -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: Include, AllowedMethods, AllowedPatterns. -# Include: app/models/**/*.rb -# AllowedMethods: order, limit, select, lock -Rails/FindEach: - Exclude: - - 'app/models/auth_source.rb' - - 'app/models/group.rb' - - 'app/models/issue.rb' - - 'app/models/issue_status.rb' - - 'app/models/project.rb' - - 'app/models/query.rb' - - 'app/models/repository.rb' - - 'app/models/setting.rb' - - 'app/models/watcher.rb' - - 'app/models/wiki_page.rb' - # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/HasAndBelongsToMany: diff --git a/Gemfile b/Gemfile index 44b6fbff0..8c5c65514 100644 --- a/Gemfile +++ b/Gemfile @@ -105,7 +105,7 @@ group :test do # RuboCop gem 'rubocop', '~> 1.57.0', require: false gem 'rubocop-performance', '~> 1.19.0', require: false - gem 'rubocop-rails', '~> 2.20.2', require: false + gem 'rubocop-rails', '~> 2.21.2', require: false end local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")