Rails/ReversibleMigration incorrectly flags reversible change_column_default
based on argument ordering
#357
Labels
bug
Something isn't working
The ReversibleMigration Cop complained about a usage of
change_column_default
, even though all necessary parameters were supplied:The detection seemed to be thrown off by the order of the keyword arguments. After swapping
from: false
andto: true
the complaint vanished.Expected behavior
The ReversibleMigration Cop should not complain about the above mentioned code, since it is reversible. It should not take into account the order of keyword arguments.
Actual behavior
The ReversibleMigration Cop complains about a reversible migration, seemingly because it checks the necessary arguments in a fixed order.
Steps to reproduce the problem
change
method.RuboCop version
rubocop 0.90.0 (using Parser 2.7.1.4, rubocop-ast 0.3.0, running on ruby 2.6.5 x86_64-darwin18)
rubocop-rails (2.8.0)
The text was updated successfully, but these errors were encountered: