From 1dec32c37ac2f563e164021c9f21052f11fd1d20 Mon Sep 17 00:00:00 2001 From: Michael Gattozzi Date: Mon, 9 Dec 2019 17:42:08 -0500 Subject: Make the pre-commit script pedantic and fix errors This commit really ups the level and quality of the Rust code by setting clippy to pedantic mode. It also fixes an issue where bash continued to run scripts even if something failed with a non-zero exit status. We also deny all warnings so as to actually fail the builds and the commit hooks. This should make sure code quality stays at a high level. --- .dev-suite/hooked/pre-commit | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.dev-suite') diff --git a/.dev-suite/hooked/pre-commit b/.dev-suite/hooked/pre-commit index 9ae83cf..931d7ac 100755 --- a/.dev-suite/hooked/pre-commit +++ b/.dev-suite/hooked/pre-commit @@ -1,5 +1,7 @@ #! /bin/bash +set -eu -o pipefail + cargo build --all cargo test --all cargo +nightly fmt --all -- --check -cargo clippy --all --all-targets +cargo clippy --all --all-targets -- -W clippy::pedantic -- cgit v1.2.3