-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhk.pkl
More file actions
62 lines (59 loc) · 2.48 KB
/
Copy pathhk.pkl
File metadata and controls
62 lines (59 loc) · 2.48 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
59
60
61
62
amends "package://github.com/jdx/hk/releases/download/v1.48.0/hk@1.48.0#/Config.pkl"
exclude = List("**/vendor/**", "target")
hooks {
["commit-msg"] {
steps {
["checkcommitmsg"] {
check = "pnpx commitlint --edit {{commit_msg_file}}"
}
}
}
["pre-commit"] {
steps {
["build-and-test"] {
check = "./bake build && ./bake test"
exclusive = true
}
["check-spelling"] {
check = "cspell-cli lint ."
}
["check-formatting"] {
glob = List("**/*.{js,ts,css,html,json,md,yaml,yml}")
fix = "./node_modules/.bin/prettier --write {{files}}"
}
["check-linting"] {
glob = List("**/*.{js,ts}")
check = "./node_modules/.bin/eslint ."
}
["check-shellscript-format"] {
glob = List("**/*.sh")
check = "find . \\( -name vendor -prune \\) -o \\( -name .git -prune \\) -o \\( -name .data -prune \\) -o \\( -name shell.d -prune \\) -o -name '*.sh' -exec shfmt --write --language-dialect bash --binary-next-line {} +"
}
["check-shellscript-lint"] {
glob = List("**/*.sh")
check = "find . \\( -name vendor -prune \\) -o \\( -name .git -prune \\) -o \\( -name .data -prune \\) -o \\( -name shell.d -prune \\) -o -name '*.sh' -exec shellcheck --format gcc {} + | grep -v '\\(g_disable\\|_shell_original_path\\|_private\\).*SC2154'"
}
["check-yaml-format"] {
glob = List("**/*.yaml", "**/*.yml")
check = "find . \\( -name vendor -prune \\) -o \\( -name .git -prune \\) -o \\( -name .data -prune \\) -o \\( -name shell.d -prune \\) -o -name '*.yaml' -o -name '*.yml' -exec yamlfmt -lint {} +"
}
["check-yaml-lint"] {
glob = List("**/*.yaml", "**/*.yml")
check = "find . \\( -name vendor -prune \\) -o \\( -name .git -prune \\) -o \\( -name .data -prune \\) -o \\( -name shell.d -prune \\) -o -name '*.yaml' -o -name '*.yml' -exec yamllint --strict {} +"
}
["check-github-actions-lint"] {
glob = List(".github/**/*.yaml", ".github/**/*.yml")
check = "bash -c 'zizmor --strict-collection --min-confidence=low --min-severity=informational --persona=pedantic --config <(printf \"rules:\\n anonymous-definition:\\n disable: true\\n undocumented-permissions:\\n disable: true\\n\") .github'"
}
["check-toml-format"] {
glob = List("**/*.toml")
exclude = List("vendor")
check = "tombi format --check {{files}}"
}
["check-toml-lint"] {
glob = List("**/*.toml")
check = "tombi lint --error-on-warnings"
}
}
}
}