diff options
author | Michael Gattozzi <mgattozzi@gmail.com> | 2019-12-09 17:42:08 -0500 |
---|---|---|
committer | Michael Gattozzi <mgattozzi@gmail.com> | 2019-12-10 13:17:08 -0500 |
commit | 1dec32c37ac2f563e164021c9f21052f11fd1d20 (patch) | |
tree | 8d5508b09b742e63e72fbbf1571b5667b3ec0e1e /hooked/tests/init.rs | |
parent | fcd4ccbec30493872feba137342347541b6a4e28 (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 'hooked/tests/init.rs')
-rw-r--r-- | hooked/tests/init.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<dyn Error>> { 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"); |