-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhk.pkl
More file actions
51 lines (47 loc) · 1.27 KB
/
Copy pathhk.pkl
File metadata and controls
51 lines (47 loc) · 1.27 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
amends "package://github.com/jdx/hk/releases/download/v1.49.0/hk@1.49.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.49.0/hk@1.49.0#/Builtins.pkl"
local message = new Mapping<String, Step> {
["check-conventional-commit"] = Builtins.check_conventional_commit
}
local builtins = new Mapping<String, Step> {
["cargo-check"] = Builtins.cargo_check
["cargo-clippy"] = Builtins.cargo_clippy
["cargo-fmt"] = Builtins.cargo_fmt
["check-case-conflict"] = Builtins.check_case_conflict
["check-merge-conflict"] = Builtins.check_merge_conflict
["end-of-file-fixer"] = Builtins.newlines
["trailing-whitespace"] = Builtins.trailing_whitespace
["yamlfmt"] = Builtins.yamlfmt
}
local local_hooks = new Mapping<String, Step> {
["codespell"] {
glob = List("**/*.rs", "readme.md")
exclude = List("target/**", "fixtures/**", "hk.pkl")
check = "codespell -c {{files}}"
fix = "codespell -cw {{files}}"
}
["version-check"] {
check = "scripts/check-version.sh"
}
["git-check"] {
check = "scripts/check-git.sh"
}
["nix fmt"] {
fix = "nixfmt flake.nix"
}
}
hooks {
["commit-msg"] {
steps {
...message
}
}
["pre-commit"] {
fix = true
stash = "git"
steps {
...builtins
...local_hooks
}
}
}