We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails/ActiveRecordCallbacksOrder
Given this file:
# app/models/foo.rb class Foo < ApplicationRecord after_create :thing1 before_validation :thing2 # comment after_create :thing3 # comment 2 before_validation :thing4 end
Running rubocop -a hangs forever. If you interrupt it, the file will look something like this:
rubocop -a
If you remove the comments, it autocorrects fine:
class Foo < ApplicationRecord before_validation :thing2 before_validation :thing4 after_create :thing1 after_create :thing3 end
No infinite loop.
See above.
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
rubocop -V
bundle exec rubocop -V
$ [bundle exec] rubocop -V 0.91.1 (using Parser 2.7.1.4, rubocop-ast 0.4.2, running on ruby 2.7.1 x86_64-darwin19)
rubocop-rails (2.8.1)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Given this file:
Running
rubocop -a
hangs forever. If you interrupt it, the file will look something like this:If you remove the comments, it autocorrects fine:
Expected behavior
No infinite loop.
Actual behavior
See above.
Steps to reproduce the problem
See above.
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler. Here's an example:The text was updated successfully, but these errors were encountered: