Closed nabetani closed 3 years ago
フィードバックありがとうございます。再現しました。Layout/TrailingWhitespace
cop や Layout/IndentHeredoc
cop あたりに何かしらの問題があるかもしれません。
% rubocop -a
(snip)
@copyright Copyright© 2019 NABETANI Takenori
^
example.rb:405:363: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
@copyright Copyright© 2019 NABETANI Takenori
^
example.rb:405:364: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
@copyright Copyright© 2019 NABETANI Takenori
^
example.rb:406:1: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
0 files inspected, 6668 offenses detected, 6668 offenses corrected
Infinite loop detected in /Users/koic/src/github.com/koic/rubocop-issues/59/example.rb.
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:260:in `block in iterate_until_no_changes'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:256:in `loop'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:256:in `iterate_until_no_changes'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:227:in `do_inspection_loop'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:124:in `block in file_offenses'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:142:in `file_offense_cache'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:122:in `file_offenses'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:110:in `process_file'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:87:in `block in each_inspected_file'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:86:in `each'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:86:in `reduce'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:86:in `each_inspected_file'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:73:in `inspect_files'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/runner.rb:39:in `run'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cli.rb:210:in `execute_runner'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cli.rb:80:in `execute_runners'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/lib/rubocop/cli.rb:51:in `run'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/exe/rubocop:13:in `block in <top (required)>'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/Users/koic/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rubocop-0.75.1/exe/rubocop:12:in `<top (required)>'
/Users/koic/.rbenv/versions/2.6.5/bin/rubocop:23:in `load'
/Users/koic/.rbenv/versions/2.6.5/bin/rubocop:23:in `<main>'
RuboCop の最新バージョン (1.13.0) で解決されていましたので、こちらクローズします (数ヶ月前のリリース時には、解決されていたように思えます) 。また、何かございましたらフィードバックしてください。ありがとうございました。
詳細な再現条件は不明ですが、
は必須のようです。 再現動画を https://github.com/nabetani/cop-throws-away/blob/master/movie.mp4 に置きました。 動画のとおり、インデントを増やす→その結果をファイルに書き込む→またインデントを増やす…… を繰り返すようです。 同リポジトリにある https://github.com/nabetani/cop-throws-away/blob/master/sample.rb が現象が再現するファイルです。
動画はソースコードが画面から消え去った時点で終わっていますが、最終的には以下のようなエラーが出て終了します: