-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathhk.pkl
More file actions
45 lines (41 loc) · 1.21 KB
/
hk.pkl
File metadata and controls
45 lines (41 loc) · 1.21 KB
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.19.0/hk@1.19.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.19.0/hk@1.19.0#/Builtins.pkl"
local linters = new Mapping<String, Step> {
["actionlint"] = Builtins.actionlint
["prettier"] = (Builtins.prettier) {
exclude = List("CLAUDE.md", "CHANGELOG.md") // TODO: fix symbolic links with prettier built-in: ([error] Explicitly specified pattern "CLAUDE.md" is a symbolic link.)
}
["cargo-fmt"] = Builtins.cargo_fmt
["cargo-clippy"] = (Builtins.cargo_clippy) {
check = "cargo clippy -q -- -D warnings"
}
["shfmt"] = (Builtins.shfmt) {
glob = List("**/*.bats", "**/*.sh", "**/*.bash")
}
["shellcheck"] = (Builtins.shellcheck) {
glob = List("**/*.bats", "**/*.sh", "**/*.bash")
}
// define a custom linter
["pkl"] {
glob = "*.pkl"
check = "pkl eval {{files}} >/dev/null"
}
}
fail_fast = false
hooks {
["pre-commit"] {
fix = true
stash = "git"
steps = linters
}
//["pre-push"] {
// steps = linters
//}
["fix"] {
fix = true
steps = linters
}
["check"] {
steps = linters
}
}