mirror of
https://github.com/imjasonh/nescript
synced 2026-07-09 09:18:01 +00:00
19 lines
395 B
Text
19 lines
395 B
Text
|
|
#!/bin/sh
|
||
|
|
# Pre-commit hook for nescript
|
||
|
|
# Install: cp scripts/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
|
||
|
|
|
||
|
|
set -e
|
||
|
|
|
||
|
|
echo "Running pre-commit checks..."
|
||
|
|
|
||
|
|
echo " Checking formatting..."
|
||
|
|
cargo fmt --all -- --check
|
||
|
|
|
||
|
|
echo " Running clippy..."
|
||
|
|
cargo clippy --all-targets -- -D warnings
|
||
|
|
|
||
|
|
echo " Running tests..."
|
||
|
|
cargo test --all-targets
|
||
|
|
|
||
|
|
echo "All pre-commit checks passed."
|