Update RuboCop to 1.0 (#32530).

git-svn-id: http://svn.redmine.org/redmine/trunk@20171 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2020-10-23 00:47:03 +00:00
parent b354566367
commit a92203595a
3 changed files with 184 additions and 60 deletions

View File

@@ -4,6 +4,8 @@ AllCops:
TargetRubyVersion: 2.4
TargetRailsVersion: 5.2
NewCops: enable
Exclude:
- '**/vendor/**/*'
- '**/tmp/**/*'
@@ -33,20 +35,20 @@ Layout/CaseIndentation:
Layout/EmptyLineBetweenDefs:
AllowAdjacentOneLineDefs: true
Layout/SpaceAroundEqualsInParameterDefault:
Enabled: false
Layout/SpaceBeforeBlockBraces:
# "space" is used more than "no_space".
# But "no_space" is more natural in one liner.
# str = path.to_s.split(%r{[/\\]}).select{|p| !p.blank?}.join("/")
Enabled: false
# You can see results by "rubocop --only Layout/SpaceInsideBlockBraces"
Layout/SpaceInsideBlockBraces:
EnforcedStyle: no_space
SpaceBeforeBlockParameters: false
Enabled: false
# You can see results by "rubocop --only Layout/SpaceInsideHashLiteralBraces"
Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space
Enabled: false
Lint/RaiseException:
Enabled: true
@@ -123,6 +125,9 @@ Style/IdenticalConditionalBranches:
- 'config/initializers/10-patches.rb'
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
Style/RaiseArgs:
Enabled: false
Style/TrailingCommaInArrayLiteral:
Enabled: false