Skip to content

Reads precommit metadata from Cargo.toml and executes on commit

Notifications You must be signed in to change notification settings

rustation/pre-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pre-commit

Reads hooks metadata from Cargo.toml and executes on commit

Installing

[dependencies]
pre-commit = "0.5.2"

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.

About

Reads precommit metadata from Cargo.toml and executes on commit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages