-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhk.pkl
More file actions
45 lines (42 loc) · 946 Bytes
/
hk.pkl
File metadata and controls
45 lines (42 loc) · 946 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
amends "package://github.com/jdx/hk/releases/download/v1.2.0/hk@1.2.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.2.0/hk@1.2.0#/Builtins.pkl"
local rust_steps = new Mapping<String, Step> {
["cargo-fmt"] {
glob = "*.rs"
check = "cargo fmt --check"
fix = "cargo fmt"
}
["cargo-clippy"] {
glob = "*.rs"
check = "cargo clippy"
fix = "cargo clippy --fix"
}
["cargo-check"] {
glob = "*.rs"
check = "cargo check"
}
["cargo-test"] {
glob = "*.rs"
check = "cargo test"
}
}
local all_steps = new Mapping<String, Step> {
...rust_steps
}
hooks {
["pre-commit"] {
fix = true
stash = "patch-file"
steps = all_steps
}
["pre-push"] {
steps = all_steps
}
["fix"] {
fix = true
steps = all_steps
}
["check"] {
steps = all_steps
}
}