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
Léo-Paul Géneau
gitlab-ce
Commits
17c8d15b
Commit
17c8d15b
authored
Feb 10, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable `Lint/EmptyWhen` cop and correct offense
parent
5db56efe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
.rubocop.yml
.rubocop.yml
+4
-0
.rubocop_todo.yml
.rubocop_todo.yml
+0
-4
lib/gitlab/diff/parser.rb
lib/gitlab/diff/parser.rb
+1
-1
No files found.
.rubocop.yml
View file @
17c8d15b
...
...
@@ -572,6 +572,10 @@ Lint/ElseLayout:
Lint/EmptyEnsure
:
Enabled
:
true
# Checks for the presence of `when` branches without a body.
Lint/EmptyWhen
:
Enabled
:
true
# Align ends correctly.
Lint/EndAlignment
:
Enabled
:
true
...
...
.rubocop_todo.yml
View file @
17c8d15b
...
...
@@ -21,10 +21,6 @@ Lint/AmbiguousRegexpLiteral:
Lint/AssignmentInCondition
:
Enabled
:
false
# Offense count: 1
Lint/EmptyWhen
:
Enabled
:
false
# Offense count: 20
Lint/HandleExceptions
:
Enabled
:
false
...
...
lib/gitlab/diff/parser.rb
View file @
17c8d15b
...
...
@@ -45,7 +45,7 @@ module Gitlab
line_new
+=
1
when
"-"
line_old
+=
1
when
"
\\
"
when
"
\\
"
# rubocop:disable Lint/EmptyWhen
# No increment
else
line_new
+=
1
...
...
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