From 081f9128a4971e0862a4060a3d02b05b0c8f9d78 Mon Sep 17 00:00:00 2001 From: Abhemanyu Sarin Date: Sat, 21 Sep 2024 19:22:33 +0530 Subject: [PATCH] add pre-commit hook --- .githooks/pre-commit | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .githooks/pre-commit diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100644 index 0000000..1633c88 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +export CARGO_TERM_COLOR=always + +echo '+cargo fmt' +cargo fmt --all +echo '+cargo test' +cargo test +echo '+cargo clippy -- -D warnings' +cargo clippy -- -D warnings