-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhk.pkl
More file actions
58 lines (54 loc) · 1.37 KB
/
Copy pathhk.pkl
File metadata and controls
58 lines (54 loc) · 1.37 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
46
47
48
49
50
51
52
53
54
55
56
57
58
amends "package://github.com/jdx/hk/releases/download/v1.55.0/hk@1.55.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.55.0/hk@1.55.0#/Builtins.pkl"
exclude = List("sync/**")
local linters = new Mapping<String, Step> {
["dprint"] = (Builtins.dprint) {
glob = "**/*.{json,jsonc,md,yaml,yml,toml}"
}
["shellcheck"] = Builtins.shellcheck
["shfmt"] = (Builtins.shfmt) {
match_any =
Builtins.shfmt.match_any
+ List(new FileSelector {
glob = List("src/dot_zshenv", "src/dot_zprofile")
})
}
["bash"] {
glob = List("**/*.sh")
check = "bash -n {{ files }}"
}
["zsh"] {
glob = List("**/*.zsh", "src/dot_zshenv", "src/dot_zprofile")
check = "zsh -n {{ files }}"
}
["zshellcheck"] {
glob = List("**/*.zsh", "src/dot_zshenv", "src/dot_zprofile")
check = "zshellcheck -no-banner {{ files }}"
fix = "zshellcheck -no-banner -fix {{ files }}"
batch = true
}
["actionlint"] = Builtins.actionlint
["zizmor"] = (Builtins.zizmor) {
glob = ".github/{actions,workflows}/**/*.{yaml,yml}"
}
["pkl"] = Builtins.pkl
["pkl-format"] = Builtins.pkl_format
}
hooks {
["pre-commit"] {
fix = true
stash = "git"
steps = linters
}
["post-tool-use"] {
fix = true
steps = linters
}
["fix"] {
fix = true
steps = linters
}
["check"] {
steps = linters
}
}