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
I expect rubocop to inspect String interpolation containing Rails.root without any error. This is the line causing the error:
msg="Navigate to #{Rails.root}. Position is: #{Dir.pwd}"
Please note, the line belongs to a plugin located outside of a rails app when rubocop runs over it.
I expected this behavior because it was no problem in the past. Please don't ask me for the last rubocop version causing no error like that above. I don't know.
Actual behavior
AnerroroccurredwhileRails/FilePathcopwasinspecting /home/path/to/file/data.rb:128:16.undefinedmethod`str_type?' for nil:NilClass return unless rails_root_node.arguments.last.str_type? ^^^^^^^^^^/home/of/user/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-rails-2.20.2/lib/rubocop/cop/rails/file_path.rb:166:in `autocorrect_extension_after_rails_root_join_in_dstr'
Steps to reproduce the problem
Create a directory with a ruby file containing a line like that above.
Create also .rubocop.yml with the following content:
Expected behavior
I expect rubocop to inspect String interpolation containing
Rails.root
without any error. This is the line causing the error:Please note, the line belongs to a plugin located outside of a rails app when rubocop runs over it.
I expected this behavior because it was no problem in the past. Please don't ask me for the last rubocop version causing no error like that above. I don't know.
Actual behavior
Steps to reproduce the problem
.rubocop.yml
with the following content:RuboCop version
The text was updated successfully, but these errors were encountered: