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

Enable `Lint/EmptyWhen` cop and correct offense

parent 629526e9
No related branches found
No related tags found
1 merge request!1227EE: Enable Style/RedundantException, Lint/EmptyWhen, and RSpec/ExpectActual cops
Pipeline #
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -21,10 +21,6 @@ Lint/AmbiguousRegexpLiteral:
Lint/AssignmentInCondition:
Enabled: false
 
# Offense count: 1
Lint/EmptyWhen:
Enabled: false
# Offense count: 22
Lint/HandleExceptions:
Enabled: false
Loading
Loading
Loading
Loading
@@ -45,7 +45,7 @@ def parse(lines)
line_new += 1
when "-"
line_old += 1
when "\\"
when "\\" # rubocop:disable Lint/EmptyWhen
# No increment
else
line_new += 1
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