-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config file for optional pre-commit hooks.
Run "cargo fmt" on commit. Run "cargo test" on push. Add introduction to pre-commit in HACKING.md
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# See https://pre-commit.com/ for usage and config | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: fmt | ||
name: cargo fmt | ||
description: Format files with cargo fmt. | ||
entry: cargo fmt -- | ||
language: system | ||
types: [rust] | ||
stages: [commit] | ||
args: [] | ||
|
||
- id: test | ||
name: cargo test | ||
description: Run tests with cargo test. | ||
entry: cargo test | ||
language: system | ||
types: [rust] | ||
stages: [push] | ||
args: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters