srhickma / padd

Fast and Automatic Formatting of Context-Free Languages
Apache License 2.0
2 stars 2 forks source link

Multi-stage formatting #179

Open srhickma opened 5 years ago

srhickma commented 5 years ago

After #126, allow formatters to be pipelined to apply multiple stages of formatting. For example, the formatting of a java file could have the following stages: main formatting -> break long lines -> eliminate trailing whitespace -> done.

srhickma commented 5 years ago

It will be desirable to have all stages for a single file applied in succession, rather than running each stage on all files before proceeding. This will help to ensure that files are left in possibly invalid states for the smallest amount of time.

srhickma commented 4 years ago

Special care will need to given to ensure that tracking information is correct when using multiple formatters. We could use the sha256 of the combined specifications (in order, with some separators) to determine the combined version.