lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
690 stars 72 forks source link

Add check mode for use by test suites #178

Closed mightybyte closed 6 years ago

mightybyte commented 6 years ago

This pull request adds a mode makes no changes to files, but returns 0 (success) when no changes would be made and 1 (failure) when changes would be made. This mode is useful for enforcing the use of brittany on a project without imposing things on the dev workflow. You can simply run this mode in CI and it will fail if brittany needs to be run.

lspitzner commented 6 years ago

Looks good, thanks!

CMCDragonkai commented 5 years ago

Can this be added into the documentation, how to use in the command line? I'd like to integrate this into my Gitlab precommit hooks.