summaryrefslogtreecommitdiff
path: root/pre-commit
blob: b173d89466b2425319457e067f75354ecbd25fd5 (plain)
1
2
3
4
5
6
7
8
#!/bin/sh
if git diff --name-only --cached | grep '^server/'; then
	cd server
	cargo fmt || exit 1
	cargo clippy -- -D warnings || exit 1
	cd ..
fi
git add -u