aboutsummaryrefslogtreecommitdiff
path: root/.dev-suite
diff options
context:
space:
mode:
authorMichael Gattozzi <mgattozzi@gmail.com>2019-12-09 17:42:08 -0500
committerMichael Gattozzi <mgattozzi@gmail.com>2019-12-10 13:17:08 -0500
commit1dec32c37ac2f563e164021c9f21052f11fd1d20 (patch)
tree8d5508b09b742e63e72fbbf1571b5667b3ec0e1e /.dev-suite
parentfcd4ccbec30493872feba137342347541b6a4e28 (diff)
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.
Diffstat (limited to '.dev-suite')
-rwxr-xr-x.dev-suite/hooked/pre-commit4
1 files changed, 3 insertions, 1 deletions
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