mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 13:09:18 +08:00
DEV: Add RedundantReturn style check to Rubocop
This commit is contained in:
parent
6c16d5762c
commit
be15abcf7f
17
.rubocop.yml
17
.rubocop.yml
|
@ -2,12 +2,12 @@ AllCops:
|
||||||
TargetRubyVersion: 2.4
|
TargetRubyVersion: 2.4
|
||||||
DisabledByDefault: true
|
DisabledByDefault: true
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'db/schema.rb'
|
- "db/schema.rb"
|
||||||
- 'bundle/**/*'
|
- "bundle/**/*"
|
||||||
- 'vendor/**/*'
|
- "vendor/**/*"
|
||||||
- 'node_modules/**/*'
|
- "node_modules/**/*"
|
||||||
- 'public/**/*'
|
- "public/**/*"
|
||||||
- 'plugins/**/gems/**/*'
|
- "plugins/**/gems/**/*"
|
||||||
|
|
||||||
# Prefer &&/|| over and/or.
|
# Prefer &&/|| over and/or.
|
||||||
Style/AndOr:
|
Style/AndOr:
|
||||||
|
@ -57,7 +57,7 @@ Layout/SpaceAroundOperators:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Layout/SpaceBeforeFirstArg:
|
Layout/SpaceBeforeFirstArg:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
# Defining a method with parameters needs parentheses.
|
# Defining a method with parameters needs parentheses.
|
||||||
Style/MethodDefParentheses:
|
Style/MethodDefParentheses:
|
||||||
|
@ -125,3 +125,6 @@ Style/SingleLineMethods:
|
||||||
Style/Semicolon:
|
Style/Semicolon:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
AllowAsExpressionSeparator: true
|
AllowAsExpressionSeparator: true
|
||||||
|
|
||||||
|
Style/RedundantReturn:
|
||||||
|
Enabled: true
|
||||||
|
|
Loading…
Reference in New Issue
Block a user