forked from suzuki-shunsuke/pinact
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhk.pkl
More file actions
49 lines (47 loc) · 1.24 KB
/
Copy pathhk.pkl
File metadata and controls
49 lines (47 loc) · 1.24 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
amends "package://github.com/jdx/hk/releases/download/v1.45.0/hk@1.45.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.45.0/hk@1.45.0#/Builtins.pkl"
local linters = new Mapping<String, Step> {
["golangci-lint"] = Builtins.golangci_lint
["gomod-tidy"] = Builtins.gomod_tidy
["typos"] = Builtins.typos
// ["lychee"] = Builtins.lychee
["nllint"] {
glob = List("**/*")
check = "nllint -s {{files}}"
fix = "nllint -s -f {{files}}"
batch = true
}
["go-test"] {
glob = List("go.mod", "go.sum", "**/*.go")
check = "go test -race -covermode=atomic ./..."
fix = "go test -race -covermode=atomic ./..." // run as check in fix mode (no real fix possible)
batch = true
}
["ascii"] {
glob = List("**/*")
check = "bash scripts/check-ascii {{files}}"
fix = "bash scripts/check-ascii {{files}}" // run as check in fix mode (no real fix possible)
batch = true
}
}
hooks {
["pre-commit"] {
fix = true
stash = "git"
steps = linters
}
["commit-msg"] {
steps {
["validate-commit-msg"] {
check = "bash scripts/validate-commit-msg {{commit_msg_file}}"
}
}
}
["fix"] {
fix = true
steps = linters
}
["check"] {
steps = linters
}
}