-
Notifications
You must be signed in to change notification settings - Fork 0
/
lefthook.yml
29 lines (29 loc) · 914 Bytes
/
lefthook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
assert_lefthook_installed: true
pre-commit:
parallel: true
commands:
generate-readme:
run: |
set -eu
./README.ts > README.md
remark --ignore-path .gitignore --quiet --frail --no-stdout README.md # run remark again because README.md has changed
git add README.md # add README.md manually instead of using `stage_fixed` because it may not have been staged
format:
run: cargo fmt --all
stage_fixed: true
lint-code:
run: cargo clippy --all-targets --all-features -- -D warnings
test-code:
run: cargo nextest run --no-fail-fast
lint-docs:
run: remark --ignore-path .gitignore --quiet --frail --no-stdout .
test-docs:
run: cargo test --doc
sort-deps:
run: cargo sort
lint-deps:
run: cargo machete --with-metadata
commit-msg:
commands:
"lint commit message":
run: commitlint --edit "$1"