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.
[Fix rubocop#7899] Fix an infinite loop error for `Layout/SpaceAround…
…Operators` Fixes rubocop#7899. This PR fixes the following infinite loop error for `Layout/SpaceAroundOperators` with `Layout/ExtraSpacing` when using `ForceEqualSignAlignment: true`. ```console % bundle exec rubocop -V 0.82.0 (using Parser 2.7.1.1, running on ruby 2.7.0 x86_64-darwin17) % cat .rubocop.yml Layout/ExtraSpacing: ForceEqualSignAlignment: true % cat example.rb test123456 = nil test1234 = nil test1_test2_test3_test4_12 =nil % bundle exec rubocop -a --only Layout/ExtraSpacing,Layout/SpaceAroundOperators (snip) Infinite loop detected in /Users/koic/src/github.com/koic/rubocop-issues/7899/example.rb. /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/runner.rb:287:in `check_for_infinite_loop' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/runner.rb:270:in `block in iterate_until_no_changes' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/runner.rb:269:in `loop' /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/runner.rb:269:in `iterate_until_no_changes' ```
- Loading branch information
Showing
4 changed files
with
43 additions
and
2 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
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