summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-02-19 13:45:34 +0000
committerGo MAEDA <maeda@farend.jp>2020-02-19 13:45:34 +0000
commit5873af5ae32cf901071738efb8decadc0e9428c0 (patch)
treea4fee909abbd124ab211e4a392c60d44d2214102
parent6f603f285f4b8514bf42efe90fe62f571ff715ca (diff)
downloadredmine-5873af5ae32cf901071738efb8decadc0e9428c0.tar.gz
redmine-5873af5ae32cf901071738efb8decadc0e9428c0.zip
Update RuboCop to 0.80 (#32530).
git-svn-id: http://svn.redmine.org/redmine/trunk@19522 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--.rubocop.yml9
-rw-r--r--.rubocop_todo.yml22
-rw-r--r--Gemfile2
3 files changed, 23 insertions, 10 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index a383a9172..73f1d18f0 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -96,10 +96,19 @@ Style/FrozenStringLiteralComment:
- 'config.ru'
- 'config/additional_environment.rb'
+Style/HashEachMethods:
+ Enabled: true
+
Style/HashSyntax:
Enabled: true
EnforcedStyle: no_mixed_keys
+Style/HashTransformKeys:
+ Enabled: true
+
+Style/HashTransformValues:
+ Enabled: true
+
Style/IdenticalConditionalBranches:
Exclude:
- 'config/initializers/10-patches.rb'
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 110834848..0e499a5a5 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 0.79.0.
+# using RuboCop version 0.80.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
@@ -493,7 +493,7 @@ Naming/MethodName:
- 'test/helpers/application_helper_test.rb'
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
-# AllowedNames: io, id, to, by, on, in, at, ip, db, os
+# AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
Naming/MethodParameterName:
Enabled: false
@@ -984,7 +984,7 @@ Style/BlockComments:
- 'lib/diff.rb'
# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
+# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
@@ -993,12 +993,6 @@ Style/BlockDelimiters:
Enabled: false
# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: braces, no_braces, context_dependent
-Style/BracesAroundHashParameters:
- Enabled: false
-
-# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
@@ -1149,6 +1143,16 @@ Style/GlobalVars:
Style/GuardClause:
Enabled: false
+# Cop supports --auto-correct.
+Style/HashEachMethods:
+ Exclude:
+ - 'app/controllers/application_controller.rb'
+ - 'app/controllers/groups_controller.rb'
+ - 'app/models/mailer.rb'
+ - 'app/models/role.rb'
+ - 'test/functional/issues_custom_fields_visibility_test.rb'
+ - 'test/unit/auth_source_ldap_test.rb'
+
# Configuration parameters: AllowIfModifier.
Style/IfInsideElse:
Exclude:
diff --git a/Gemfile b/Gemfile
index e9b751e79..b8bad69f6 100644
--- a/Gemfile
+++ b/Gemfile
@@ -87,7 +87,7 @@ group :test do
gem 'capybara', (RUBY_VERSION < '2.4' ? '~> 3.15.1' : '~> 3.31.0')
gem "selenium-webdriver"
# RuboCop
- gem 'rubocop', '~> 0.79.0'
+ gem 'rubocop', '~> 0.80.0'
gem 'rubocop-performance', '~> 1.5.0'
gem 'rubocop-rails', '~> 2.4.0'
end