Closed Piioo closed 4 months ago
You require rubocop-rspec in your .rubocop.yml. Do you have it in your Gemfile?
yes,
gem 'rubocop', require: false
gem 'rubocop-performance', require: false
gem 'rubocop-rails', '~> 2.21', require: false
gem 'rubocop-rspec', require: false
gem 'rubocop-factory_bot', require: false
Maybe it is my system :/
When I add a binding.pry to the place where the error happen, it change nothing. I have to check
But it is fine when I require it in console:
[4] pry(main)> require 'rubocop-factory_bot'
=> false
When I remove rubocop-factory_bot
from .rubocop.yml
then rubocop works too
ok, it is working on a fresh rails app. I need to search the problem on my system
I also am experiencing this issue. files are present in Gemfile & rubocop.yml
What if you set the breakpoint in /Users/pisz/.asdf/installs/ruby/3.3.2/lib/ruby/gems/3.3.0/gems/rubocop-1.64.1/lib/rubocop/feature_loader.rb:46? https://github.com/rubocop/rubocop/blob/f33b940844b777ea6414f05fa0225771f6eb0913/lib/rubocop/feature_loader.rb#L46
What are the values for ‘target’, ‘e.path’, ‘namespaced_target’ etc?
ok, found the problem
https://docs.rubocop.org/rubocop/usage/caching.html
I had to remove the rubocop cache:
/Users/pisz/.cache/rubocop_cache
After this rubocop has reloaded the whole files again.
I do not know why this is there and maybe it is a bug in rubocop. I will report it there.
I'm fairly sure this is caused by server mode, see https://github.com/rubocop/rubocop/issues/12557
I using rubocop with rubocop-factory_bot.
rubocop.yml
Gemfile and Gemfile.lock
When I run
bundle exec rubocop
I got: