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
Inspecting 1 file
.
1 file inspected, no offenses detected
Actual behavior
Offenses:
test.rb:6:17: C: [Corrected] Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
_customer = if params[:customer_id]
^^
test.rb:6:18: C: [Corrected] Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
_customer = (if params[:customer_id]
^^
test.rb:6:72: C: [Corrected] Style/IfUnlessModifier: Modifier form of if makes the line too long.
_customer = (CustomerCell.new(Customer.find(params[:customer_id])) if params[:customer_id])
^^
0 files inspected, 3 offenses detected, 3 offenses corrected
Infinite loop detected in /home/me/tmp/test.rb.
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:292:in `check_for_infinite_loop'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:275:in `block in iterate_until_no_changes'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:274:in `loop'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:274:in `iterate_until_no_changes'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:245:in `do_inspection_loop'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:124:in `block in file_offenses'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:148:in `file_offense_cache'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:122:in `file_offenses'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:113:in `process_file'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:92:in `block in each_inspected_file'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:91:in `each'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:91:in `reduce'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:91:in `each_inspected_file'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:78:in `inspect_files'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/runner.rb:39:in `run'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/cli/command/execute_runner.rb:21:in `execute_runner'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/cli/command/execute_runner.rb:13:in `run'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/cli/command.rb:10:in `run'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/cli/environment.rb:17:in `run'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/cli.rb:65:in `run_command'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/cli.rb:72:in `execute_runners'
/home/me/.gem/gems/rubocop-0.83.0/lib/rubocop/cli.rb:41:in `run'
/home/me/.gem/gems/rubocop-0.83.0/exe/rubocop:13:in `block in <top (required)>'
/usr/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
/home/me/.gem/gems/rubocop-0.83.0/exe/rubocop:12:in `<top (required)>'
/home/me/.gem/bin/rubocop:23:in `load'
/home/me/.gem/bin/rubocop:23:in `<main>'
Expected behavior
The code should be fine, as it is with 0.82.0:
Actual behavior
Steps to reproduce the problem
Create
test.rb
with this content:Create
.rubocop.yml
with this content:Run
rubocop -a test.rb
RuboCop version
Broken version:
Good version:
Possibly related change
I haven't checked, but I assume this change could have broken this: #7872
The text was updated successfully, but these errors were encountered: