-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhk.pkl
More file actions
47 lines (34 loc) · 1.14 KB
/
hk.pkl
File metadata and controls
47 lines (34 loc) · 1.14 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
// SPDX-FileCopyrightText: 2026 Knitli Inc.
// SPDX-FileContributor: Adam Poulemanos <adam@knit.li>
//
// SPDX-License-Identifier: Apache-2.0
amends "package://github.com/jdx/hk/releases/download/v1.32.0/hk@1.32.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.32.0/hk@1.32.0#/Builtins.pkl"
local linters = new Mapping<String, Step> {
["actionlint"] = Builtins.actionlint
["pkl"] = Builtins.pkl
["pkl_format"] = Builtins.pkl_format
["cargo_check"] = Builtins.cargo_check
["cargo_clippy"] = Builtins.cargo_clippy
["cargo_fmt"] = Builtins.cargo_fmt
["check_added_large_files"] = Builtins.check_added_large_files
["format_mise"] = Builtins.mise
["newlines"] = Builtins.newlines
["tombi"] = Builtins.tombi
["tombi_format"] = Builtins.tombi_format
}
hooks {
["pre-commit"] {
fix = true // automatically modify files with available linter fixes
stash = "git" // stashes unstaged changes while running fix steps
steps = linters
}
// "fix" and "check" are special steps for `hk fix` and `hk check` commands
["fix"] {
fix = true
steps = linters
}
["check"] {
steps = linters
}
}