The Rubocop cop Layout/EmptyLineAfterGuardClause appears to trigger with slim-lint for every guard clause, regardless of whether there's an empty line after it or not.
Example:
test.html.slim
- arr = [1, 2, 3]
- arr.each do |e|
- next if e == 2
= e
$ bundle exec slim-lint test.html.slim
test.html.slim:3 [W] RuboCop: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
Adding an empty code line doesn't fix it either, but just adds another warning:
- arr = [1, 2, 3]
- arr.each do |e|
- next if e == 2
-
= e
$ bundle exec slim-lint test.html.slim
test.html.slim:3 [W] RuboCop: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
test.html.slim:4 [W] EmptyControlStatement: Empty control statement can be removed
Versions:
slim-lint 0.27.0
rubocop 1.63.4
The Rubocop cop Layout/EmptyLineAfterGuardClause appears to trigger with slim-lint for every guard clause, regardless of whether there's an empty line after it or not.
Example:
test.html.slim$ bundle exec slim-lint test.html.slim test.html.slim:3 [W] RuboCop: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.Adding an empty code line doesn't fix it either, but just adds another warning:
$ bundle exec slim-lint test.html.slim test.html.slim:3 [W] RuboCop: Layout/EmptyLineAfterGuardClause: Add empty line after guard clause. test.html.slim:4 [W] EmptyControlStatement: Empty control statement can be removedVersions:
slim-lint 0.27.0
rubocop 1.63.4