Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
5db56efe
Commit
5db56efe
authored
Nov 30, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable `Style/RedundantException` cop and correct offense
parent
92cbc1e4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
.rubocop.yml
.rubocop.yml
+4
-0
.rubocop_todo.yml
.rubocop_todo.yml
+0
-5
app/helpers/preferences_helper.rb
app/helpers/preferences_helper.rb
+1
-1
No files found.
.rubocop.yml
View file @
5db56efe
...
...
@@ -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
...
...
.rubocop_todo.yml
View file @
5db56efe
...
...
@@ -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
:
...
...
app/helpers/preferences_helper.rb
View file @
5db56efe
...
...
@@ -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
,
_
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment