Skip to content

Commit 8ba948a

Browse files
committed
chore: add prek
1 parent af456a8 commit 8ba948a

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ Please create an issue or PR if you'd like to add support for other targets.
1717
- `hue list` prints out available themes
1818
- `hue set <theme>` sets a logical theme and synchronises it across targets
1919
- `hue set <theme> --dry-run` shows a diff of the update without applying any changes
20+
21+
# Development
22+
Make sure you have [Rust](https://rust-lang.org/tools/install/) installed.
23+
24+
## Pre-commit Hooks
25+
- Install [prek](https://github.com/j178/prek)
26+
- Install the local Git hooks `prek install`
27+
- Manual run with `prek run`

prek.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[[repos]]
2+
repo = "local"
3+
hooks = [
4+
{ id = "cargo-fmt-check", name = "format", entry = "cargo fmt --all --check", language = "system", pass_filenames = false, stages = ["pre-commit"] },
5+
{ id = "cargo-clippy", name = "clippy", entry = "cargo clippy --all-targets --all-features -- -D warnings", language = "system", pass_filenames = false, stages = ["pre-commit"] },
6+
{ id = "cargo-test", name = "test", entry = "cargo test --all-targets --all-features", language = "system", pass_filenames = false, always_run = true, stages = ["pre-commit", "pre-push"] },
7+
]

0 commit comments

Comments
 (0)