BalticAmadeus / AblFormatter

Code formatter for Progress OpenEdge (ABL)
Apache License 2.0
5 stars 0 forks source link

Testing Formatter Idempotence #200

Open PauliusKu opened 1 month ago

PauliusKu commented 1 month ago

Come up with a practical solution how to ensure formatter idempotence. https://en.wikipedia.org/wiki/Idempotence

gustason commented 1 month ago

A possible solution: create unit tests that run the formatter more than once. In the case of failing tests, explore ways to implement idempotence on a case-by-case basis.

Another possibility is to rerun the formatter only if the user has changed something in the file. It requires a smart system, however, it also ensures true idempotence.