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
After updating rubocop-rspec gem (rubocop-rspec (1.42.0)) I got this alert in console:
3 errors occurred:
An error occurred while RSpec/FilePath cop was inspecting /.../app/channels/application_cable/channel.rb.
An error occurred while RSpec/FilePath cop was inspecting /.../app/channels/application_cable/connection.rb.
An error occurred while RSpec/FilePath cop was inspecting /.../app/controllers/application_controller.rb.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop-hq/rubocop/issues
Mention the following information in the issue report:
0.89.1 (using Parser 2.7.1.4, rubocop-ast 0.3.0, running on ruby 2.7.1 x86_64-darwin19)
All this files are similar - they are empty and doesn't used at all:
app/channels/application_cable/channel.rb:
# frozen_string_literal: true
module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end
app/channels/application_cable/connection.rb:
# frozen_string_literal: true
module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end
app/controllers/application_controller.rb:
# frozen_string_literal: true
class ApplicationController < ActionController::API
end
when I run rubocop -d app/controllers/application_controller.rb, I got this trace:
An error occurred while RSpec/FilePath cop was inspecting /Users/ruslan/synergy/synergy-lms-api/app/controllers/application_controller.rb.
undefined method `begin_type?' for nil:NilClass
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-rspec-1.43.0/lib/rubocop/rspec/top_level_group.rb:41:in `top_level_nodes'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-rspec-1.43.0/lib/rubocop/rspec/top_level_group.rb:44:in `top_level_nodes'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-rspec-1.43.0/lib/rubocop/rspec/top_level_group.rb:26:in `top_level_groups'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-rspec-1.43.0/lib/rubocop/rspec/top_level_group.rb:18:in `on_new_investigation'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cop/commissioner.rb:103:in `block (2 levels) in invoke'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cop/commissioner.rb:112:in `with_cop_error_handling'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cop/commissioner.rb:102:in `block in invoke'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cop/commissioner.rb:101:in `each'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cop/commissioner.rb:101:in `invoke'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cop/commissioner.rb:72:in `investigate'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cop/team.rb:151:in `investigate_partial'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cop/team.rb:83:in `investigate'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:295:in `inspect_file'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:245:in `block in do_inspection_loop'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:277:in `block in iterate_until_no_changes'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:270:in `loop'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:270:in `iterate_until_no_changes'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:241:in `do_inspection_loop'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:121:in `block in file_offenses'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:146:in `file_offense_cache'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:120:in `file_offenses'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:111:in `process_file'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:90:in `block in each_inspected_file'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:89:in `each'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:89:in `reduce'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:89:in `each_inspected_file'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:78:in `inspect_files'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/runner.rb:39:in `run'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cli/command/execute_runner.rb:21:in `execute_runner'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cli/command/execute_runner.rb:13:in `run'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cli/command.rb:10:in `run'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cli/environment.rb:17:in `run'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cli.rb:65:in `run_command'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cli.rb:72:in `execute_runners'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/lib/rubocop/cli.rb:41:in `run'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/exe/rubocop:13:in `block in <top (required)>'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
/Users/ruslan/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/rubocop-0.89.1/exe/rubocop:12:in `<top (required)>'
/Users/ruslan/.rbenv/versions/2.7.1/bin/rubocop:23:in `load'
/Users/ruslan/.rbenv/versions/2.7.1/bin/rubocop:23:in `<main>'
.
1 file inspected, no offenses detected
Expected behavior
rubocop doesn't throws any exception or alerts.
Actual behavior
After updating rubocop-rspec gem (rubocop-rspec (1.42.0)) I got this alert in console:
All this files are similar - they are empty and doesn't used at all:
app/channels/application_cable/channel.rb:
app/channels/application_cable/connection.rb:
app/controllers/application_controller.rb:
when I run
rubocop -d app/controllers/application_controller.rb
, I got this trace:Steps to reproduce the problem
run
rubocop
RuboCop version
0.89.1 (using Parser 2.7.1.4, rubocop-ast 0.3.0, running on ruby 2.7.1 x86_64-darwin19)
The text was updated successfully, but these errors were encountered: