An error occurred while Rails/DeprecatedActiveModelErrorsMethods cop was inspecting
amagasu opened this issue · 3 comments
Expected behavior
After upgrading from Rails 6.0.5 environment to 6.1.7.7, running Rubocop results in an error.
(ruby 3.1.2)
When running in a Rails 6.0.5 environment, no errors occur.
bundle exec rubocop
Actual behavior
An error occurred while Rails/DeprecatedActiveModelErrorsMethods cop was inspecting
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.29.1 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.1.2 x86_64-darwin21)
The same error occurs when running on CircleCI
1.29.1 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.1.2 x86_64-linux)
The error occurred with the following code
errors.keys.any? { |key| ERROR_KEYS.include?(key) }
ERROR_KEYS is array.
Steps to reproduce the problem
This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.
RuboCop version
$bundle exec rubocop -v
1.29.1
(using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.1.2 x86_64-darwin21)
Changing keys to attribute_names and run bundle exec rubocop
resulted in no errors.
errors.attribute_names.any? { |attr| KEYS.include?(attr) }
$bundle exec rubocop -v
The issue cannot be reproduced. Can you provide the output of rubocop -V
instead of rubocop -v
? Note that it is uppercase V
.
I will close this due to a lack of information to reproduce. If the issue persists even after upgrading to the latest RuboCop Rails, please add more information and reopen the issue. Thank you.