Commit 629526e9 authored by Robert Speicher's avatar Robert Speicher

Enable `Style/RedundantException` cop and correct offense

parent e2c4d427
......@@ -339,6 +339,10 @@ Style/OpMethod:
Style/ParenthesesAroundCondition:
Enabled: true
# Checks for an obsolete RuntimeException argument in raise/fail.
Style/RedundantException:
Enabled: true
# Checks for parentheses that seem not to serve any purpose.
Style/RedundantParentheses:
Enabled: true
......
......@@ -416,11 +416,6 @@ Style/RaiseArgs:
Style/RedundantBegin:
Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantException:
Enabled: false
# Offense count: 29
# Cop supports --auto-correct.
Style/RedundantFreeze:
......
......@@ -23,7 +23,7 @@ module PreferencesHelper
if defined.size != DASHBOARD_CHOICES.size
# Ensure that anyone adding new options updates this method too
raise RuntimeError, "`User` defines #{defined.size} dashboard choices," +
raise "`User` defines #{defined.size} dashboard choices," \
" but `DASHBOARD_CHOICES` defined #{DASHBOARD_CHOICES.size}."
else
defined.map do |key, _|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment