Debian Codegraph @

.githooks/pre-commit

raw
1 #!/bin/bash
2 #
3 # Git pre-commit hook that runs precious lint on staged files
4 #
5
6 set -e
7
8 echo "Running precious lint on staged files..."
9
10 # Run precious lint on staged files
11 if ! precious lint --staged; then
12 echo ""
13 echo "❌ Linting failed. Please fix the issues above before committing."
14 echo ""
15 echo "To fix formatting issues automatically, run:"
16 echo " precious tidy --staged"
17 exit 1
18 fi
19
20 echo "✅ All linters passed!"