Skip to content
Snippets Groups Projects
Commit 629526e9 authored by Robert Speicher's avatar Robert Speicher
Browse files

Enable `Style/RedundantException` cop and correct offense

parent e2c4d427
No related branches found
No related tags found
1 merge request!1227EE: Enable Style/RedundantException, Lint/EmptyWhen, and RSpec/ExpectActual cops
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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:
Loading
Loading
Loading
Loading
@@ -23,7 +23,7 @@ def dashboard_choices
 
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, _|
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment