ruuda / rcl

A reasonable configuration language
https://rcl-lang.org
Apache License 2.0
190 stars 8 forks source link

Implement `--check` option for `rcl format` #54

Closed ruuda closed 3 months ago

ruuda commented 3 months ago

I want to check that the examples are formatted correctly on CI, so let’s have a --check mode to verify formatting. It doesn’t print the diff, because computing diffs is not trivial, and in practice you can just run rcl format --in-place and run git diff to see what changed. Maybe in the future we could report the line number of the first mismatch, but for now just printing which files have errors is probably good enough.