mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-08-07 01:33:52 +00:00
ci: add prek hooks for pre-commit and pre-push
Pre-commit: trailing whitespace, EOF fixer, merge conflict check, cargo fmt --check, cargo clippy -D warnings Pre-push: cargo nextest run
This commit is contained in:
parent
8c7c70a57a
commit
92e9bed9b6
1 changed files with 34 additions and 0 deletions
34
prek.toml
Normal file
34
prek.toml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# prek.toml — pre-commit & pre-push hooks for idx-cli
|
||||
|
||||
[[repos]]
|
||||
repo = "builtin"
|
||||
hooks = [
|
||||
{ id = "trailing-whitespace" },
|
||||
{ id = "end-of-file-fixer" },
|
||||
{ id = "check-merge-conflict" },
|
||||
]
|
||||
|
||||
[[repos]]
|
||||
repo = "local"
|
||||
|
||||
[[repos.hooks]]
|
||||
id = "cargo-fmt"
|
||||
name = "cargo fmt"
|
||||
entry = "cargo fmt --check"
|
||||
language = "system"
|
||||
types = ["rust"]
|
||||
pass_filenames = false
|
||||
|
||||
[[repos.hooks]]
|
||||
id = "cargo-clippy"
|
||||
name = "cargo clippy"
|
||||
entry = "cargo clippy -- -D warnings"
|
||||
language = "system"
|
||||
types = ["rust"]
|
||||
pass_filenames = false
|
||||
|
||||
[[repos]]
|
||||
repo = "local"
|
||||
hooks = [
|
||||
{ id = "cargo-test", name = "cargo test", entry = "cargo nextest run", language = "system", types = ["rust"], pass_filenames = false, stages = ["pre-push"] },
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue