DEV: Add RedundantReturn style check to Rubocop

This commit is contained in:
Penar Musaraj 2019-11-14 14:42:36 -05:00
parent 6c16d5762c
commit be15abcf7f

View File

@ -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