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. --- hooked/tests/init.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hooked/tests') diff --git a/hooked/tests/init.rs b/hooked/tests/init.rs index 2596d5b..65c4aab 100644 --- a/hooked/tests/init.rs +++ b/hooked/tests/init.rs @@ -33,10 +33,10 @@ const HOOKS: [&str; 18] = [ #[test] fn init() -> Result<(), Box> { let dir = tempdir()?; - Repository::init(&dir)?; + let _ = Repository::init(&dir)?; let mut cmd = Command::cargo_bin("hooked")?; env::set_current_dir(&dir)?; - cmd.arg("init").assert().success(); + let _ = cmd.arg("init").assert().success(); let git = &dir.path().join(".git").join("hooks"); let dev = &dir.path().join(".dev-suite").join("hooked"); -- cgit v1.2.3