ctran / annotate_models

Annotate Rails classes with schema and routes info
Other
4.41k stars 598 forks source link

Fix `annotate_one_file` to avoid ignoring commented columns #1010

Open oieioi opened 8 months ago

oieioi commented 8 months ago

Fixed an issue in annotate_one_file where columns with comments were being overlooked, leading to them being excluded from change detection.

The updated regular expression now correctly matches comment lines like the following. Previously, these comments weren't matching due to the (column comment) part.

# column_name(column comment)  :column_type  not null