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
rubocop -a --config config.yml --only "Layout/ArrayAlignment,Layout/AssignmentIndentation" foo.rb
You get this infinite loop output:
Inspecting 1 file
C
Offenses:
foo.rb:2:5: C: [Corrected] Layout/ArrayAlignment: Use one level of indentation for elements following the first line of a multi-line array.
1, 2
^
foo.rb:2:5: C: [Corrected] Layout/AssignmentIndentation: Indent the first line of the right-hand-side of a multi-line assignment.
1, 2
^^^^
0 files inspected, 2 offenses detected, 2 offenses corrected
Infinite loop detected in /Users/justin/code/testdouble/static-rails/foo.rb and caused by Layout/ArrayAlignment, Layout/AssignmentIndentation
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:300:in `check_for_infinite_loop'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:283:in `block in iterate_until_no_changes'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:282:in `loop'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:282:in `iterate_until_no_changes'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:251:in `do_inspection_loop'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:128:in `block in file_offenses'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:153:in `file_offense_cache'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:127:in `file_offenses'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:118:in `process_file'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:97:in `block in each_inspected_file'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:96:in `each'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:96:in `reduce'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:96:in `each_inspected_file'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:82:in `inspect_files'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/runner.rb:43:in `run'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/cli/command/execute_runner.rb:25:in `execute_runner'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/cli/command/execute_runner.rb:17:in `run'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/cli/command.rb:11:in `run'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/cli/environment.rb:18:in `run'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/cli.rb:65:in `run_command'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/cli.rb:72:in `execute_runners'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/lib/rubocop/cli.rb:41:in `run'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/exe/rubocop:13:in `block in <top (required)>'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
/Users/justin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.91.1/exe/rubocop:12:in `<top (required)>'
/Users/justin/.rbenv/versions/2.7.1/bin/rubocop:23:in `load'
/Users/justin/.rbenv/versions/2.7.1/bin/rubocop:23:in `<main>'
I just found an infinite loop bug that affect's standard's configuration. Minimal repro steps:
Given file listing foo.rb:
and
config.yml
:and running this autocorrect command:
You get this infinite loop output:
Versions:
The text was updated successfully, but these errors were encountered: