Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #8179] Fix an infinite correction loop for `Layout/MultilineBloc…
…kLayout` Fixes #8179. This PR fixes an infinite correction loop error for `Layout/MultilineBlockLayout` when missing newline before opening parenthesis `(` for block body. ```ruby # frozen_string_literal: true foo do |o| ( bar ) end ``` ```console % rubocop -a --only Layout/MultilineBlockLayout Inspecting 1 file C Offenses: example.rb:3:12: C: [Corrected] Layout/MultilineBlockLayout: Block body expression is on the same line as the block start. foo do |o| ( ... ^ 0 files inspected, 1 offense detected, 1 offense corrected Infinite loop detected in /Users/koic/src/github.com/koic/rubocop-issues/8179/example.rb. /Users/koic/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:276:in `block in iterate_until_no_changes' /Users/koic/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:272:in `loop' /Users/koic/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:272:in `iterate_until_no_changes' /Users/koic/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:243:in `do_inspection_loop' /Users/koic/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.85.1/lib/rubocop/runner.rb:122:in `block in file_offenses' ```
- Loading branch information