You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.eachdo |e|
- nextife == 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:
$ 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 text was updated successfully, but these errors were encountered:
danarnold
changed the title
Layout/EmptyLineAfterGuardClause not working properly
Rubocop cop Layout/EmptyLineAfterGuardClause not working properly
May 6, 2024
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 removed
Versions:
slim-lint 0.27.0
rubocop 1.63.4
The text was updated successfully, but these errors were encountered: