From f75756e870fb3ae5d0c793032472391bb573c9cd Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 22 Jun 2021 05:10:53 +0000 Subject: [PATCH] Update RuboCop Rails to 2.11 (#35207). git-svn-id: http://svn.redmine.org/redmine/trunk@21043 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 48 ++++++++++++++++++++++++++++++----------------- Gemfile | 2 +- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 5fb3c50f4..72c320b80 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -643,7 +643,7 @@ Rails/ContentTag: Rails/CreateTableWithTimestamps: Enabled: false -# Configuration parameters: EnforcedStyle. +# Configuration parameters: EnforcedStyle, AllowToTime. # SupportedStyles: strict, flexible Rails/Date: Enabled: false @@ -674,6 +674,11 @@ Rails/Delegate: Rails/DynamicFindBy: Enabled: false +# Cop supports --auto-correct. +Rails/EagerEvaluationLogMessage: + Exclude: + - 'app/controllers/application_controller.rb' + # Configuration parameters: Include. # Include: app/**/*.rb, config/**/*.rb, lib/**/*.rb Rails/Exit: @@ -704,22 +709,6 @@ Rails/FilePath: - 'test/unit/lib/redmine/i18n_test.rb' - 'test/unit/lib/redmine/plugin_test.rb' -# Cop supports --auto-correct. -# Configuration parameters: Include. -# Include: app/models/**/*.rb -Rails/FindBy: - Exclude: - - 'app/models/enumeration.rb' - - 'app/models/issue_import.rb' - - 'app/models/repository.rb' - - 'app/models/repository/cvs.rb' - - 'app/models/repository/git.rb' - - 'app/models/repository/mercurial.rb' - - 'app/models/time_entry_query.rb' - - 'app/models/user.rb' - - 'app/models/wiki.rb' - - 'app/models/wiki_content_version.rb' - # Cop supports --auto-correct. # Configuration parameters: Include, IgnoredMethods. # Include: app/models/**/*.rb @@ -770,10 +759,35 @@ Rails/HasManyOrHasOneDependent: # SupportedStyles: numeric, symbolic Rails/HttpStatus: Exclude: + - 'app/controllers/attachments_controller.rb' + - 'app/controllers/boards_controller.rb' + - 'app/controllers/custom_fields_controller.rb' + - 'app/controllers/enumerations_controller.rb' + - 'app/controllers/issue_relations_controller.rb' + - 'app/controllers/issue_statuses_controller.rb' + - 'app/controllers/issues_controller.rb' - 'app/controllers/mail_handler_controller.rb' + - 'app/controllers/members_controller.rb' + - 'app/controllers/my_controller.rb' + - 'app/controllers/repositories_controller.rb' + - 'app/controllers/roles_controller.rb' - 'app/controllers/sys_controller.rb' + - 'app/controllers/timelog_controller.rb' + - 'app/controllers/trackers_controller.rb' - 'app/controllers/watchers_controller.rb' +# Configuration parameters: Include. +# Include: spec/**/*.rb, test/**/*.rb +Rails/I18nLocaleAssignment: + Exclude: + - 'test/helpers/application_helper_test.rb' + - 'test/helpers/custom_fields_helper_test.rb' + - 'test/test_helper.rb' + - 'test/unit/lib/redmine/field_format/user_field_format_test.rb' + - 'test/unit/lib/redmine/i18n_test.rb' + - 'test/unit/query_test.rb' + - 'test/unit/role_test.rb' + # Configuration parameters: Include. # Include: app/models/**/*.rb Rails/InverseOf: diff --git a/Gemfile b/Gemfile index 1c17906f1..b83cd2215 100644 --- a/Gemfile +++ b/Gemfile @@ -94,7 +94,7 @@ group :test do # RuboCop gem 'rubocop', '~> 1.17.0' gem 'rubocop-performance', '~> 1.11.0' - gem 'rubocop-rails', '~> 2.10.1' + gem 'rubocop-rails', '~> 2.11.0' end local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")