[RFC] Enforce usage of rustfmt


(Fabrice) #1

In https://github.com/fxbox/foxbox/pull/485https://github.com/fxbox/foxbox/pull/485 I investigated rustfmt to get a consistent formatting in Link’s codebase.

I there are no objections before Wednesday I’d like to land that along with a pre-commit hook.


(Johan Lorenzo) #2

Nice! I tried it locally. rustfmt takes about 3-5 seconds to run, but the installation is more around 3 minutes. I think we can also enforce that in Travis, and more especially in the fastest job (Mac OS X).

Edit: By default rustfmt replaces files. I’d recommend to set --write-mode checkstyle for the pre-commit hook. Otherwise the hook will commit changes without asking for dev’s consent.