]> source.dussan.org Git - redmine.git/commitdiff
Update RuboCop to 0.77 (#32530).
authorGo MAEDA <maeda@farend.jp>
Fri, 29 Nov 2019 07:36:15 +0000 (07:36 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 29 Nov 2019 07:36:15 +0000 (07:36 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19320 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop.yml
.rubocop_todo.yml
Gemfile

index 864bf0c4530ef244d04efb8b2aa03fe8a7679855..a383a9172ad88fe21dcf4fe34d139d1ea5a8e225 100644 (file)
@@ -48,12 +48,12 @@ Layout/SpaceInsideBlockBraces:
 Layout/SpaceInsideHashLiteralBraces:
   EnforcedStyle: no_space
 
+Lint/SuppressedException:
+  AllowComments: true
+
 Layout/TrailingWhitespace:
   AllowInHeredoc: true
 
-Lint/HandleExceptions:
-  AllowComments: true
-
 Metrics:
   Enabled: false
 
index f4dc87bb7235b43d4b780feab2a70a7d7cdb2453..9c8ca1fc91c91ab030b92559c5d22268ea53cdbf 100644 (file)
@@ -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 0.76.0.
+# using RuboCop version 0.77.0.
 # 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
@@ -9,7 +9,7 @@
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyle, IndentationWidth.
 # SupportedStyles: with_first_argument, with_fixed_indentation
-Layout/AlignArguments:
+Layout/ArgumentAlignment:
   Exclude:
     - 'config/application.rb'
     - 'lib/redmine/scm/adapters/bazaar_adapter.rb'
@@ -20,14 +20,6 @@ Layout/AlignArguments:
     - 'test/integration/api_test/projects_test.rb'
     - 'test/integration/api_test/wiki_pages_test.rb'
 
-# Cop supports --auto-correct.
-# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
-# SupportedHashRocketStyles: key, separator, table
-# SupportedColonStyles: key, separator, table
-# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
-Layout/AlignHash:
-  Enabled: false
-
 # Cop supports --auto-correct.
 Layout/ClosingParenthesisIndentation:
   Enabled: false
@@ -138,13 +130,13 @@ Layout/ExtraSpacing:
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyle, IndentationWidth.
 # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
-Layout/IndentFirstArgument:
+Layout/FirstArgumentIndentation:
   Enabled: false
 
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyle, IndentationWidth.
 # SupportedStyles: special_inside_parentheses, consistent, align_brackets
-Layout/IndentFirstArrayElement:
+Layout/FirstArrayElementIndentation:
   Exclude:
     - 'lib/redmine/nested_set/issue_nested_set.rb'
     - 'lib/redmine/nested_set/project_nested_set.rb'
@@ -157,7 +149,15 @@ Layout/IndentFirstArrayElement:
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyle, IndentationWidth.
 # SupportedStyles: special_inside_parentheses, consistent, align_braces
-Layout/IndentFirstHashElement:
+Layout/FirstHashElementIndentation:
+  Enabled: false
+
+# Cop supports --auto-correct.
+# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
+# SupportedHashRocketStyles: key, separator, table
+# SupportedColonStyles: key, separator, table
+# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
+Layout/HashAlignment:
   Enabled: false
 
 # Cop supports --auto-correct.
@@ -373,15 +373,6 @@ Lint/EmptyWhen:
     - 'app/controllers/issues_controller.rb'
     - 'app/controllers/wiki_controller.rb'
 
-# Configuration parameters: AllowComments.
-Lint/HandleExceptions:
-  Exclude:
-    - 'app/controllers/activities_controller.rb'
-    - 'app/models/import.rb'
-    - 'db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb'
-    - 'lib/redmine/scm/adapters/cvs_adapter.rb'
-    - 'lib/redmine/scm/adapters/subversion_adapter.rb'
-
 Lint/InterpolationCheck:
   Exclude:
     - 'app/models/user.rb'
@@ -403,6 +394,14 @@ Lint/ParenthesesAsGroupedExpression:
     - 'test/unit/attachment_test.rb'
     - 'test/unit/lib/redmine/export/pdf_test.rb'
 
+# Cop supports --auto-correct.
+Lint/RedundantStringCoercion:
+  Exclude:
+    - 'lib/redmine/export/pdf/issues_pdf_helper.rb'
+    - 'test/functional/repositories_filesystem_controller_test.rb'
+    - 'test/functional/repositories_git_controller_test.rb'
+    - 'test/functional/repositories_mercurial_controller_test.rb'
+
 # Cop supports --auto-correct.
 Lint/SendWithMixinArgument:
   Exclude:
@@ -412,13 +411,14 @@ Lint/SendWithMixinArgument:
 Lint/ShadowingOuterLocalVariable:
   Enabled: false
 
-# Cop supports --auto-correct.
-Lint/StringConversionInInterpolation:
+# Configuration parameters: AllowComments.
+Lint/SuppressedException:
   Exclude:
-    - 'lib/redmine/export/pdf/issues_pdf_helper.rb'
-    - 'test/functional/repositories_filesystem_controller_test.rb'
-    - 'test/functional/repositories_git_controller_test.rb'
-    - 'test/functional/repositories_mercurial_controller_test.rb'
+    - 'app/controllers/activities_controller.rb'
+    - 'app/models/import.rb'
+    - 'db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb'
+    - 'lib/redmine/scm/adapters/cvs_adapter.rb'
+    - 'lib/redmine/scm/adapters/subversion_adapter.rb'
 
 # Cop supports --auto-correct.
 Lint/UnifiedInteger:
@@ -492,6 +492,11 @@ Naming/MethodName:
     - 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
     - 'test/helpers/application_helper_test.rb'
 
+# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
+# AllowedNames: io, id, to, by, on, in, at, ip, db, os
+Naming/MethodParameterName:
+  Enabled: false
+
 # Cop supports --auto-correct.
 # Configuration parameters: PreferredName.
 Naming/RescuedExceptionsVariableName:
@@ -500,11 +505,6 @@ Naming/RescuedExceptionsVariableName:
     - 'lib/redmine/scm/adapters/abstract_adapter.rb'
     - 'lib/redmine/scm/adapters/filesystem_adapter.rb'
 
-# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
-# AllowedNames: io, id, to, by, on, in, at, ip, db, os
-Naming/UncommunicativeMethodParamName:
-  Enabled: false
-
 # Configuration parameters: EnforcedStyle.
 # SupportedStyles: snake_case, camelCase
 Naming/VariableName:
@@ -1275,8 +1275,8 @@ Style/NegatedWhile:
     - 'app/helpers/application_helper.rb'
 
 # Cop supports --auto-correct.
-# Configuration parameters: Whitelist.
-# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
+# Configuration parameters: AllowedMethods.
+# AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
 Style/NestedParenthesizedCalls:
   Exclude:
     - 'lib/redmine/views/labelled_form_builder.rb'
@@ -1474,8 +1474,8 @@ Style/RescueStandardError:
   Enabled: false
 
 # Cop supports --auto-correct.
-# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
-# Whitelist: present?, blank?, presence, try, try!
+# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
+# AllowedMethods: present?, blank?, presence, try, try!
 Style/SafeNavigation:
   Enabled: false
 
@@ -1575,8 +1575,8 @@ Style/TernaryParentheses:
   Enabled: false
 
 # Cop supports --auto-correct.
-# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
-# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
+# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethod.
+# AllowedMethod: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
 Style/TrivialAccessors:
   Exclude:
     - 'app/models/issue.rb'
diff --git a/Gemfile b/Gemfile
index ec61c69509c259c14702b9fbed8767dc84e2b930..8696c6ffd4df2c29392f04c007789fd93dd198c4 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -84,7 +84,7 @@ group :test do
   gem "capybara", (RUBY_VERSION < "2.4" ? "~> 3.15.1" : "~> 3.29.0")
   gem "selenium-webdriver"
   # RuboCop
-  gem 'rubocop', '~> 0.76.0'
+  gem 'rubocop', '~> 0.77.0'
   gem 'rubocop-performance', '~> 1.5.0'
   gem 'rubocop-rails', '~> 2.3.0'
 end