Add dev tooling to use precious

This commit is contained in:
Dave Rolsky
2023-03-05 15:15:31 -06:00
parent aa7ccd3cba
commit b34ced72c6
5 changed files with 115 additions and 0 deletions

15
git/hooks/pre-commit.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
status=0
PRECIOUS=$(which precious)
if [[ -z $PRECIOUS ]]; then
PRECIOUS=./bin/precious
fi
"$PRECIOUS" lint -s
if (( $? != 0 )); then
status+=1
fi
exit $status