cargo-hook

Crates.iocargo-hook
lib.rscargo-hook
version0.1.2
sourcesrc
created_at2023-01-11 10:13:52.417116
updated_at2023-02-15 00:44:56.212073
descriptionAdd a hook to git which will fmt, clippy and test rust code prior to commit
homepage
repositoryhttps://github.com/jackos/cargo-hook
max_upload_size
id756295
size4,241
Jack Clayton (jackos)

documentation

README

Cargo Hook

Adds a git hook to your repository, which will format, lint and test your rust code, and ask you to fix any problems before you commit.

cargo install cargo-hook
cargo hook
---------------------------
- ✨  Running clippy   ✨ -
---------------------------
    Checking cargo-hook v0.1.0 (/Users/jacko/src/cargo-hook)
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
✅
---------------------------
- ✨ Running formatter ✨ -
---------------------------
✅
---------------------------
- ✨   Running tests   ✨ -
---------------------------
   Compiling cargo-hook v0.1.0 (/Users/jacko/src/cargo-hook)
    Finished test [unoptimized + debuginfo] target(s) in 0.32s
     Running unittests src/main.rs (target/debug/deps/cargo_hook-23cd2685ff070753)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

✅
--------------------------------------
- 🎉 linted, formatted and tested 🎉 -
--------------------------------------
Commit count: 3

cargo fmt