Debian Codegraph @

mise.toml

raw symbols SCIP
1 [settings]
2 lockfile = true # DO NOT FORGET TO `touch mise.lock` if mise.lock does not exist!
3
4
5 [tools]
6 go = 'latest'
7
8 #--- Format
9 # Opinionated Code Formatter.
10 prettier = 'latest'
11
12 #--- Lint
13 # Static checker for GitHub Actions workflow files.
14 actionlint = 'latest'
15 # Fast linters runner for Go.
16 golangci-lint = 'latest'
17
18 #--- Test
19 # 'go test' runner with output optimized for humans.
20 gotestsum = 'latest'
21
22 #--- Release
23 # A highly customizable Changelog Generator that follows Conventional Commit specifications.
24 git-cliff = 'latest'
25 # GitHub's official command line tool.
26 gh = 'latest'
27
28
29 [vars]
30 cover = '.cache/cover.out'
31
32
33 [tasks.'changelog:skip-commit']
34 description = 'Add commit hash to .cliffignore to exclude from CHANGELOG'
35 usage = 'arg "<commit>" help="Git revision (e.g. HEAD or a1b2c4d)"'
36 run = 'git rev-parse --verify "${usage_commit}" >> .cliffignore'
37
38 [tasks.fmt]
39 description = 'Format all files'
40 depends = ['fmt:*']
41
42 [tasks.lint]
43 description = 'Run all linters'
44 depends = ['lint:*']
45
46 [tasks.test]
47 description = 'Run all tests'
48 depends = ['test:*']
49
50 [tasks.default]
51 description = 'Run all formatters, linters and tests'
52 depends = ['fmt', 'lint', 'test']
53
54 [tasks.ci]
55 description = 'Run all CI tasks'
56 depends = ['fmt', 'lint', 'test']
57 # Is working tree clean after fmt?
58 run = '! git status --porcelain | tee /dev/stderr | grep -q .'
59 run_windows = 'powershell -c "$status = git status --porcelain; if ($status) { $status; exit 1 }"'
60
61 [tasks.'fmt:markdown']
62 description = 'Format markdown files'
63 sources = ['**/*.md']
64 run = 'prettier --write "**/*.md"'
65
66 [tasks.'fmt:go']
67 description = 'Format Go code'
68 run = 'golangci-lint fmt'
69
70 [tasks.'lint:workflows']
71 description = 'Lint GitHub Action workflows'
72 run = 'actionlint'
73
74 [tasks.'lint:markdown']
75 description = 'Lint markdown files'
76 wait_for = ['fmt:markdown']
77 sources = ['**/*.md']
78 run = 'prettier --check "**/*.md"'
79
80 [tasks.'lint:go']
81 description = 'Lint Go files'
82 run = 'golangci-lint run'
83
84 [tasks.'lint:go-compile-windows']
85 description = 'Check Go test compiles on Windows'
86 run = 'GOOS=windows go test -c -o /dev/null ./...'
87
88 [tasks.'test:go']
89 description = 'Run Go tests for a whole project'
90 wait_for = ['lint:*'] # Avoid interleaved output with linters.
91 run = 'gotestsum -- -race -timeout=60s ./...'
92
93 [tasks.'test:go-submodule']
94 description = 'Run Go tests in the test/ submodule'
95 wait_for = ['lint:*']
96 run = 'cd test && gotestsum -- -race -timeout=60s ./...'
97
98 [tasks.'cover:go:total']
99 description = 'Show Go test coverage total'
100 depends = 'cover:go:generate'
101 run = 'go tool cover -func={{vars.cover}} | tail -n 1 | xargs echo'
102
103 [tasks.'cover:go:browse']
104 description = 'Show Go test coverage in a browser'
105 depends = 'cover:go:generate'
106 run = 'go tool cover -html={{vars.cover}}'
107
108 [tasks.'cover:go:generate']
109 hide = true
110 depends = 'cachedir'
111 sources = ['**/*.go']
112 outputs = ['{{vars.cover}}']
113 run = '''
114 gotestsum -- \
115 -coverpkg="$(go list ./... | paste -s -d,)" \
116 -coverprofile {{vars.cover}} \
117 ./...
118 go tool cover -html={{vars.cover}} -o {{vars.cover}}.html
119 '''
120
121 [tasks.cachedir]
122 hide = true
123 run = 'mkdir -p .cache'