diff options
Diffstat (limited to '.dev-suite/hooked/pre-commit.py')
-rwxr-xr-x | .dev-suite/hooked/pre-commit.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.dev-suite/hooked/pre-commit.py b/.dev-suite/hooked/pre-commit.py new file mode 100755 index 0000000..5ddbc42 --- /dev/null +++ b/.dev-suite/hooked/pre-commit.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 +import subprocess + +subprocess.run("cargo build --all", shell=True, check=True) +subprocess.run("cargo test --all -- --test-threads=1", shell=True, check=True) +subprocess.run("rustup run nightly cargo fmt --all -- --check", shell=True, check=True) +subprocess.run("cargo clippy --all --all-targets -- -W clippy::pedantic", shell=True, check=True) |