#pre #commit #metadata #hooks #precommit

pre-commit

Reads hooks metadata from Cargo.toml and executes on commit

2 unstable releases

Uses old Rust 2015

0.5.2 Dec 29, 2016
0.5.1 Dec 29, 2016
0.3.0 Dec 29, 2016
0.2.0 Dec 29, 2016
0.1.0 Dec 28, 2016
Download history 15/week @ 2022-01-21 9/week @ 2022-01-28 18/week @ 2022-02-04 11/week @ 2022-02-11 13/week @ 2022-02-18 12/week @ 2022-02-25 14/week @ 2022-03-04 19/week @ 2022-03-11 28/week @ 2022-03-18 14/week @ 2022-03-25 33/week @ 2022-04-01 8/week @ 2022-04-08 6/week @ 2022-04-15 11/week @ 2022-04-22 34/week @ 2022-04-29 40/week @ 2022-05-06

92 downloads per month
Used in lol_html

MIT license

4KB
90 lines

pre-commit

Reads hooks metadata from Cargo.toml and executes on commit

Installing

$ cargo install pre-commit

Usage

Add a table like the following to your Cargo.toml

[package.metadata.precommit]
fmt = "cargo fmt -- --write-mode diff 2>&1"
test = "cargo test 2>&1"

Then run:

cargo clean; cargo build;

You should now have a pre-commit file in your ./git/hooks that will run the listed pre-commit entries.

No runtime deps

~47KB