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
bin/rubocop app/controllers/stats_controller.rb
Inspecting 1 file
An error occurred while ThreadSafety/InstanceVariableInClassMethod cop was inspecting /Users/ledermann/Projects/solectrus/solectrus/app/controllers/stats_controller.rb:4:4.
To see the complete backtrace run rubocop -d.
.
1 file inspected, no offenses detected
1 error occurred:
An error occurred while ThreadSafety/InstanceVariableInClassMethod cop was inspecting /Users/ledermann/Projects/solectrus/solectrus/app/controllers/stats_controller.rb:4:4.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
https://github.com/rubocop/rubocop/issues
Mention the following information in the issue report:
1.48.1 (using Parser 3.2.1.1, rubocop-ast 1.28.0, running on ruby 3.2.1) [arm64-darwin22]
bin/rubocop app/controllers/stats_controller.rb -d
For /Users/ledermann/Projects/solectrus/solectrus: configuration from /Users/ledermann/Projects/solectrus/solectrus/.rubocop.yml
configuration from /Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-performance-1.16.0/config/default.yml
configuration from /Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-performance-1.16.0/config/default.yml
Default configuration from /Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.1/config/default.yml
configuration from /Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-rails-2.18.0/config/default.yml
configuration from /Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-rails-2.18.0/config/default.yml
configuration from /Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-capybara-2.17.1/config/default.yml
configuration from /Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-capybara-2.17.1/lib/../config/default.yml
configuration from /Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-rspec-2.19.0/config/default.yml
configuration from /Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-rspec-2.19.0/config/default.yml
configuration from /Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-thread_safety-0.5.0/config/default.yml
configuration from #{path}
Inheriting configuration from /Users/ledermann/Projects/solectrus/solectrus/node_modules/@prettier/plugin-ruby/rubocop.yml
Use parallel by default.
Skipping parallel inspection: only a single file needs inspection
Inspecting 1 file
Scanning /Users/ledermann/Projects/solectrus/solectrus/app/controllers/stats_controller.rb
An error occurred while ThreadSafety/InstanceVariableInClassMethod cop was inspecting /Users/ledermann/Projects/solectrus/solectrus/app/controllers/stats_controller.rb:4:4.
undefined method `send_type?' for :helper_method:Symbol
/Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-thread_safety-0.5.0/lib/rubocop/cop/thread_safety/instance_variable_in_class_method.rb:186:in `module_function_bare_access_modifier?'
/Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-thread_safety-0.5.0/lib/rubocop/cop/thread_safety/instance_variable_in_class_method.rb:150:in `block in in_def_module_function?'
/Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-thread_safety-0.5.0/lib/rubocop/cop/thread_safety/instance_variable_in_class_method.rb:150:in `any?'
/Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-thread_safety-0.5.0/lib/rubocop/cop/thread_safety/instance_variable_in_class_method.rb:150:in `in_def_module_function?'
/Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-thread_safety-0.5.0/lib/rubocop/cop/thread_safety/instance_variable_in_class_method.rb:107:in `class_method_definition?'
/Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-thread_safety-0.5.0/lib/rubocop/cop/thread_safety/instance_variable_in_class_method.rb:82:in `on_ivar'
/Users/ledermann/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rubocop-1.48.1/lib/rubocop/cop/commissioner.rb:107:in `public_send'
After changing the code to this, parsing works fine without any error:
Since v0.5.0, code using inline helper_method like this breaks the parser:
After changing the code to this, parsing works fine without any error:
The text was updated successfully, but these errors were encountered: