From: Go MAEDA Date: Sun, 16 Apr 2023 11:51:01 +0000 (+0000) Subject: Update RuboCop Rails to 2.19 (#37248). X-Git-Tag: 5.1.0~163 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=87dc1d90587e59dcc9256ba62565099616651164;p=redmine.git Update RuboCop Rails to 2.19 (#37248). git-svn-id: https://svn.redmine.org/redmine/trunk@22200 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop.yml b/.rubocop.yml index 398fac707..89564b5a1 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -157,6 +157,17 @@ Rails/RootPathnameMethods: Rails/SquishedSQLHeredocs: Enabled: false +Rails/ThreeStateBooleanColumn: + Exclude: + - 'db/migrate/009_add_hide_mail_pref.rb' + - 'db/migrate/059_add_roles_assignable.rb' + - 'db/migrate/082_add_messages_locked.rb' + - 'db/migrate/086_add_custom_fields_searchable.rb' + - 'db/migrate/102_add_custom_fields_editable.rb' + - 'db/migrate/20120115143100_add_repositories_is_default.rb' + - 'db/migrate/20120127174243_add_custom_fields_multiple.rb' + - 'db/migrate/20210704125704_add_twofa_required_to_groups.rb' + Rails/WhereExists: Enabled: false @@ -209,10 +220,6 @@ 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 09061594f..85f07454a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -569,7 +569,7 @@ Rails/Exit: - 'config/initializers/10-patches.rb' - 'config/routes.rb' -# This cop supports safe autocorrection (--autocorrect). +# This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: Include, AllowedMethods, AllowedPatterns. # Include: app/models/**/*.rb # AllowedMethods: order, limit, select, lock @@ -765,6 +765,7 @@ Rails/RedundantTravelBack: - 'test/integration/sudo_mode_test.rb' - 'test/system/sudo_mode_test.rb' +# This cop supports unsafe autocorrection (--autocorrect-all). Rails/ReflectionClassName: Exclude: - 'lib/redmine/nested_set/issue_nested_set.rb' diff --git a/Gemfile b/Gemfile index 075108ea9..2dd77660d 100644 --- a/Gemfile +++ b/Gemfile @@ -105,7 +105,7 @@ group :test do # RuboCop gem 'rubocop', '~> 1.50.0', require: false gem 'rubocop-performance', '~> 1.17.1', require: false - gem 'rubocop-rails', '~> 2.18.0', require: false + gem 'rubocop-rails', '~> 2.19.1', require: false end local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")