Skip to content

A platform for community discussion. Free, open, simple.

DEV: Add RedundantReturn style check to Rubocop

Penar Musarajbe15abcf7f40
diff --git a/.rubocop.yml b/.rubocop.yml
index 0d66c3bf6c1..15096124c0e 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -2,12 +2,12 @@ AllCops:
TargetRubyVersion: 2.4
DisabledByDefault: true
Exclude:
- - 'db/schema.rb'
- - 'bundle/**/*'
- - 'vendor/**/*'
- - 'node_modules/**/*'
- - 'public/**/*'
- - 'plugins/**/gems/**/*'
+ - "db/schema.rb"
+ - "bundle/**/*"
+ - "vendor/**/*"
+ - "node_modules/**/*"
+ - "public/**/*"
+ - "plugins/**/gems/**/*"
# Prefer &&/|| over and/or.
Style/AndOr:
@@ -57,7 +57,7 @@ Layout/SpaceAroundOperators:
Enabled: true
Layout/SpaceBeforeFirstArg:
- Enabled: true
+ Enabled: true
# Defining a method with parameters needs parentheses.
Style/MethodDefParentheses:
@@ -125,3 +125,6 @@ Style/SingleLineMethods:
Style/Semicolon:
Enabled: true
AllowAsExpressionSeparator: true
+
+Style/RedundantReturn:
+ Enabled: true