Conversation
`rubocop -A` would generate false positives. After this change we use `rubocop -a` instead. See https://docs.rubocop.org/rubocop/usage/auto_correct.html#safe-auto-correct
|
In the generated code, no use cases that would cause false positives are expected. Therefore, What specific use cases would cause issues with |
|
My concern is not with specific use cases coming from Rails itself (code and cops under control of rails/rails) but it's one about resilience with either generated files from other gems or cops from adjusted configurations. For me running |
|
The new rails authentication framework, while created through a generator, is handwritten code being copied into a users own app. The It's highly unfortunate that |
|
One way around the |
|
Thank you for opening a pull request. After thinking about this, I've decided to close this pull request. Here are reasons why: Applying unsafe or safe auto correct depends not only on the command-line options -A or -a, but also on whether the user's rubocop.yml contains unsafe cops. So, if users always want autocorrect to use only safe cops, they can define a rubocop.yml that contains only safe cops. As for unsafe cops, Some people want Thanks again for opening a pull request. Looking forward to future contributions. |
rubocop -Awould generate false positive fixes.After this change we use
rubocop -ainstead.The idea is not to change semantics with RuboCop
See https://docs.rubocop.org/rubocop/usage/auto_correct.html#safe-auto-correct