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
When trying to run safe auto-correct to resolve issues in my Rails project, I see a large number of incorrect formats occurring. When disabling the Rails/DynamicFindBy cop, this issue seems to go away.
Currently, this code gets formatted into this when the Rails/DynamicFindBy cop is enabled.
Steps to reproduce the problem
Create a Rails project that uses the Rubocop configuration I've mentioned above, and then copy the example code into a controller file (not necessarily sure if it has to be a controller, that's just where I found the issue), and then run bin/rubocop -a and see how it affects the file.
RuboCop version
EDIT: Upgraded to rubocop-ast-1.0.0 and got the same results.
When trying to run safe auto-correct to resolve issues in my Rails project, I see a large number of incorrect formats occurring. When disabling the Rails/DynamicFindBy cop, this issue seems to go away.
Here's a link to the Rubocop configuration that I'm using: https://gist.github.com/zdw27f/9a935a27e55180ff66cc3b94ca107b86
.rubocop.yml < rubocop-rails.yml < rubocop-core.yml
Here's an example of running
bin/rubocop -a
that shows what the formatting looks like w/ and w/o the DynamicFindBy cop: https://gist.github.com/zdw27f/1e430dcfb255e73694ff90af05b78217Expected behavior
I expect this code to get formatted to look like this.
Actual behavior
Currently, this code gets formatted into this when the Rails/DynamicFindBy cop is enabled.
Steps to reproduce the problem
Create a Rails project that uses the Rubocop configuration I've mentioned above, and then copy the example code into a controller file (not necessarily sure if it has to be a controller, that's just where I found the issue), and then run
bin/rubocop -a
and see how it affects the file.RuboCop version
EDIT: Upgraded to rubocop-ast-1.0.0 and got the same results.
The text was updated successfully, but these errors were encountered: