From 817d8100c1aecc28f5327f0c9b0e7f9fd54d04c8 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 25 Mar 2023 02:39:54 +0000 Subject: [PATCH] Update RuboCop Rails to 2.18 (#37248). git-svn-id: https://svn.redmine.org/redmine/trunk@22154 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop.yml | 4 ++++ .rubocop_todo.yml | 7 +++---- Gemfile | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index f929a55dc..398fac707 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -209,6 +209,10 @@ Style/IdenticalConditionalBranches: - 'config/initializers/10-patches.rb' - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' +Style/InverseMethods: + InverseMethods: + :include?: ~ + Style/NegatedIfElseCondition: Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 67ece8457..06404cd65 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -211,7 +211,6 @@ Layout/SpaceAfterNot: - 'test/functional/workflows_controller_test.rb' - 'test/unit/attachment_test.rb' - 'test/unit/lib/redmine/export/pdf_test.rb' - - 'test/unit/project_copy_test.rb' - 'test/unit/project_test.rb' - 'test/unit/query_test.rb' - 'test/unit/role_test.rb' @@ -483,7 +482,7 @@ Rails/ActiveRecordCallbacksOrder: - 'app/models/version.rb' - 'app/models/wiki_page.rb' -# Configuration parameters: Include. +# Configuration parameters: Severity, Include. # Include: app/models/**/*.rb Rails/ActiveRecordOverride: Exclude: @@ -545,6 +544,7 @@ Rails/CreateTableWithTimestamps: Rails/Date: Enabled: false +# Configuration parameters: Severity. Rails/DuplicateScope: Exclude: - 'app/models/enumeration.rb' @@ -571,10 +571,9 @@ Rails/Exit: - 'config/routes.rb' # This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: Include, AllowedMethods, AllowedPatterns, IgnoredMethods. +# Configuration parameters: Include, AllowedMethods, AllowedPatterns. # Include: app/models/**/*.rb # AllowedMethods: order, limit, select, lock -# IgnoredMethods: order, limit, select, lock Rails/FindEach: Exclude: - 'app/models/auth_source.rb' diff --git a/Gemfile b/Gemfile index 7a2d1e6dd..293866b57 100644 --- a/Gemfile +++ b/Gemfile @@ -105,7 +105,7 @@ group :test do # RuboCop gem 'rubocop', '~> 1.48.1', require: false gem 'rubocop-performance', '~> 1.16.0', require: false - gem 'rubocop-rails', '~> 2.17.2', require: false + gem 'rubocop-rails', '~> 2.18.0', require: false end local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") -- 2.39.5