From dd3d6206bd81745961e0e006414c0f9a3c0c0d05 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Fri, 11 Apr 2025 08:12:37 +0000 Subject: [PATCH] Update RuboCop to 1.72 (#41884). git-svn-id: https://svn.redmine.org/redmine/trunk@23623 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 21 ++++++++++++++++++++- Gemfile | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index aee767d54..0811d53c2 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --exclude-limit 20 --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 1.69.0. +# using RuboCop version 1.72.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -232,6 +232,12 @@ Lint/SuppressedException: - 'lib/redmine/scm/adapters/cvs_adapter.rb' - 'lib/redmine/scm/adapters/subversion_adapter.rb' +# This cop supports unsafe autocorrection (--autocorrect-all). +Lint/SuppressedExceptionInNumberConversion: + Exclude: + - 'lib/redmine/core_ext/string/conversions.rb' + - 'test/unit/query_test.rb' + # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AutoCorrect, IgnoreEmptyBlocks, AllowUnusedKeywordArguments. Lint/UnusedBlockArgument: @@ -248,6 +254,14 @@ Lint/UnusedMethodArgument: Lint/UselessAssignment: Enabled: false +Lint/UselessConstantScoping: + Exclude: + - 'app/controllers/repositories_controller.rb' + - 'app/models/mail_handler.rb' + - 'lib/redmine/acts/mentionable.rb' + - 'lib/redmine/asset_path.rb' + - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' + # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AutoCorrect, CheckForMethodsWithNoSideEffects. Lint/Void: @@ -1121,6 +1135,11 @@ Style/RedundantConditional: - 'app/models/enumeration.rb' - 'lib/redmine/field_format.rb' +# This cop supports unsafe autocorrection (--autocorrect-all). +Style/RedundantFormat: + Exclude: + - 'test/unit/lib/redmine/wiki_formatting/common_mark/formatter_test.rb' + # This cop supports unsafe autocorrection (--autocorrect-all). Style/RedundantInterpolation: Exclude: diff --git a/Gemfile b/Gemfile index 00d583f91..3deb4f891 100644 --- a/Gemfile +++ b/Gemfile @@ -111,7 +111,7 @@ group :test do gem "capybara", ">= 3.39" gem 'selenium-webdriver', '>= 4.11.0' # RuboCop - gem 'rubocop', '~> 1.69.0', require: false + gem 'rubocop', '~> 1.72.2', require: false gem 'rubocop-performance', '~> 1.23.0', require: false gem 'rubocop-rails', '~> 2.29.0', require: false gem 'bundle-audit', require: false