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
This seems to be related to #6882. RuboCop stumbles on dynamic validations, in this case with string interpolations
Expected behavior
RuboCop finishes without errors
Actual behavior
1 error occurred:
An error occurred while Rails/RedundantAllowNil cop was inspecting /path/to/my/class.rb:4:2.
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.67.2 (using Parser 2.5.1.0, running on ruby 2.5.1 x86_64-linux-gnu)
Steps to reproduce the problem
This minimal class should reproduce the problem.
class Foo < ActiveRecord::Base
validates :details, "path_to_dynamic_validation/#{with_interpolation}": true
end
RuboCop version
0.67.2 (using Parser 2.5.1.0, running on ruby 2.5.1 x86_64-linux-gnu)
The text was updated successfully, but these errors were encountered:
An error occurred while Rails/RedundantAllowNil cop was inspecting /myapp/app/models/foo.rb:3:2.
undefined method `value' for "s(:dsym,\n s(:begin,\n s(:const,\n s(:self), :BAR)))":RuboCop::AST::Node
This seems to be related to #6882. RuboCop stumbles on dynamic validations, in this case with string interpolations
Expected behavior
RuboCop finishes without errors
Actual behavior
Steps to reproduce the problem
This minimal class should reproduce the problem.
RuboCop version
The text was updated successfully, but these errors were encountered: