forked from rubocop/rubocop
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves rubocop#7778. This PR resolves a false positive for `Layout/EndAlignment` when a non-whitespace is used before the `end` keyword. ```console % cat example.rb if cond else 'foo' end % bundle exec rubocop -a --only Layout/EndAlignment (snip) Inspecting 1 file W Offenses: example.rb:2:12: W: Layout/EndAlignment: end at 2, 11 is not aligned with if at 1, 0. else 'foo' end ^^^ 1 file inspected, 1 offense detected ``` This PR changes to not offense it. I think the responsibility will be clear if different (maybe new) cop like `Layout/BlockEndNewline` cop handle the offense case. So I think this role is preferably separated by `Layout/EndAlignment` cop.
- Loading branch information
Showing
3 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters