add check-fmt convenience script

This commit is contained in:
surtur 2022-05-03 18:22:48 +02:00
parent d0201747ae
commit 0cea753c38
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

10
check-fmt Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env nix-shell
#!nix-shell ./shell.nix -i bash
#
# as per https://github.com/tweag/gomod2nix/blob/master/check-fmt
# Just because the nixpkgs-fmt error message is not super readable. Used by CI.
if ! nixpkgs-fmt --check . ; then
echo 'run `nixpkgs-fmt .` to fix it'
exit 1
fi