ctran/annotate_models

Reformat Column comments

Opened this issue · 1 comments

This stems from reverse-engineering a PostgreSQL database…
Add the ability to move column comments to the next line, and indented 'n' spaces.
Also soft-wrap to column 'm' (default 80), and interpret newline characters (\n).

Currently columns with long comments cause the page width to extend to the end of the comment making it difficult to access the datatype as it overflows the window.

E.g. current formatting:

# assembly_failures(The list of causes of failure for an assembly.\n This is a template field copied to the Test when it is created.\n This array creates a list of checkboxes in the form. :jsonb

Proposed formatting:

#  assembly_failures                                       :jsonb
#       The list of causes of failure for an assembly.
#       This is a template field copied to the Test when it is created.
#       This array creates a list of checkboxes in the form.

Version

  • annotate version: 3.2.0
  • rails version: 7.1.3
  • ruby version: 3.3.0

Yes, please! Was about to submit a PR to simply add a space between the field name and the (, but this is way better.