summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.rubocop.yml4
-rw-r--r--.rubocop_todo.yml5
-rw-r--r--app/helpers/preferences_helper.rb2
3 files changed, 5 insertions, 6 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 21ea8372e4b..1061de7c797 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -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
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 4714b64b896..7ef5523de4b 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -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:
diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb
index 6e68aad4cb7..dd0a4ea03f0 100644
--- a/app/helpers/preferences_helper.rb
+++ b/app/helpers/preferences_helper.rb
@@ -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, _|