-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.config.toml
More file actions
330 lines (255 loc) · 6.97 KB
/
Copy pathexample.config.toml
File metadata and controls
330 lines (255 loc) · 6.97 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# dev configuration file (unified verbs)
default_language = "rust"
[summary]
# First-class verbs capture output through this shell using `-lc`.
shell = "bash"
# Bound captured stdout/stderr before printing a compact summary.
max_output_bytes = 65536
tail_bytes = 12288
# Optional: command receives a prompt on stdin and prints the summary on stdout.
# llm_command = "your-llm-summarizer"
# ===================== Rust ========================
[tasks.rust_build]
commands = [["cargo", "build", "--release"]]
[tasks.rust_fmt]
commands = [["cargo", "fmt"]]
[tasks.rust_fmt_check]
commands = [["cargo", "fmt", "--", "--check"]]
[tasks.rust_lint]
# regular lint (may warn, does not modify files)
commands = [["cargo", "clippy"]]
[tasks.rust_lint_check]
# fail on warnings (good for CI/check)
commands = [["cargo", "clippy", "--", "-D", "warnings"]]
[tasks.rust_type]
# Rust "type check" is effectively cargo check
commands = [["cargo", "check"]]
[tasks.rust_test]
commands = [["cargo", "test"]]
[tasks.rust_audit]
commands = [["cargo", "audit"]]
[tasks.rust_udeps]
commands = [["cargo", "+nightly", "udeps"]]
# grouped
[tasks.rust_fix]
# auto-fixable actions only
commands = [
"rust_fmt"
]
[tasks.rust_check]
# pre-commit style: no file modifications
commands = [
"rust_fmt_check",
"rust_lint_check",
"rust_type",
"rust_test"
]
[tasks.rust_ci_extras]
# Security and dependency hygiene. Safe for CI, no file writes.
commands = [
["cargo", "audit"],
["cargo", "+nightly", "udeps"]
]
[tasks.rust_ci]
commands = [
"rust_check",
"rust_ci_extras"
]
# ===================== Python ========================
[tasks.py_fmt]
# formatter (write)
commands = [["uv", "run", "ruff", "format", "."]]
[tasks.py_fmt_check]
# formatter, no write
commands = [["uv", "run", "ruff", "format", "--check", "."]]
[tasks.py_lint]
# static lint, no write
commands = [["uv", "run", "ruff", "check", "."]]
[tasks.py_lint_fix]
# auto-fixable lint
commands = [["uv", "run", "ruff", "check", ".", "--fix"]]
[tasks.py_type]
commands = [["uv", "run", "mypy", "."]]
[tasks.py_test]
commands = [["uv", "run", "pytest"]]
[tasks.py_fix]
commands = [
"py_lint_fix",
"py_fmt"
]
[tasks.py_check]
commands = [
"py_fmt_check",
"py_lint",
"py_type",
"py_test"
]
[tasks.py_all]
commands = [
["uv", "run", "ruff", "check", "."],
["uv", "run", "ruff", "format", "."],
["uv", "run", "mypy", "."],
["uv", "run", "pytest"]
]
[tasks.py_precommit_all]
commands = [["uv", "run", "pre-commit", "run", "--all-files"]]
[tasks.py_ci]
commands = [
"py_fmt_check",
"py_lint",
"py_type",
"py_test",
"py_precommit_all"
]
# ===================== TypeScript ========================
[tasks.ts_fmt]
# write changes
commands = [["pnpm", "prettier", "--write", "."]]
[tasks.ts_fmt_check]
# no write
commands = [["pnpm", "prettier", "--check", "."]]
[tasks.ts_lint]
# no write by default, fail on warnings
commands = [["pnpx", "eslint", ".", "--ext", ".ts,.tsx", "--max-warnings", "0"]]
[tasks.ts_lint_fix]
# auto-fixable
commands = [["pnpx", "eslint", ".", "--ext", ".ts,.tsx", "--fix"]]
[tasks.ts_type]
commands = [["pnpm", "tsc", "--noEmit"]]
[tasks.ts_type_build]
commands = [["pnpm", "tsc", "-p", "tsconfig.build.json"]]
[tasks.ts_test]
# choose your default test runner here; vitest shown
commands = [["pnpm", "vitest", "--run"]]
[tasks.ts_test_jest]
commands = [["pnpm", "jest", "--runInBand"]]
[tasks.ts_hygiene]
commands = [["pnpm", "dlx", "ts-prune"]]
[tasks.ts_fix]
commands = [
"ts_lint_fix",
"ts_fmt"
]
[tasks.ts_check]
commands = [
"ts_fmt_check",
"ts_lint",
"ts_type",
"ts_test",
"ts_hygiene"
]
[tasks.ts_ci]
commands = [
"ts_fmt_check",
"ts_lint",
"ts_type",
"ts_test",
"ts_hygiene"
]
# ===================== Elixir ========================
[tasks.elixir_deps]
commands = [["mix", "deps.get"]]
[tasks.elixir_fmt]
commands = [["mix", "format"]]
[tasks.elixir_fmt_check]
commands = [["mix", "format", "--check-formatted"]]
[tasks.elixir_lint]
# fail on compiler warnings
commands = [["mix", "compile", "--warnings-as-errors"]]
[tasks.elixir_type]
# default "type" gate without requiring Dialyzer
commands = [["mix", "compile", "--warnings-as-errors"]]
[tasks.elixir_test]
commands = [["mix", "test"]]
[tasks.elixir_fix]
commands = [
"elixir_fmt"
]
[tasks.elixir_check]
commands = [
"elixir_fmt_check",
"elixir_lint",
"elixir_test"
]
[tasks.elixir_ci]
commands = [
"elixir_deps",
"elixir_check"
]
# ===================== Language installs ========================
[languages.rust]
install = [
["cargo", "install", "cargo-audit"],
["cargo", "install", "cargo-udeps", "--version", "0.1.56", "--locked"]
]
# Map the six verbs to tasks
[languages.rust.pipelines]
fmt = ["rust_fmt"]
lint = ["rust_lint_check"]
type = ["rust_type"]
test = ["rust_test"]
fix = ["rust_fix"]
check = ["rust_check"]
ci = ["rust_ci"]
[languages.python]
install = [["uv", "sync"]]
[languages.python.pipelines]
fmt = ["py_fmt"]
lint = ["py_lint"]
type = ["py_type"]
test = ["py_test"]
fix = ["py_fix"]
check = ["py_check"]
ci = ["py_ci"]
[languages.typescript]
install = [["pnpm", "install"]]
[languages.typescript.pipelines]
fmt = ["ts_fmt"]
lint = ["ts_lint"]
type = ["ts_type"]
test = ["ts_test"] # or ["ts_test_jest"]
fix = ["ts_fix"]
check = ["ts_check"]
ci = ["ts_ci"]
[languages.elixir]
install = [["mix", "deps.get"]]
[languages.elixir.pipelines]
fmt = ["elixir_fmt"]
lint = ["elixir_lint"]
type = ["elixir_type"]
test = ["elixir_test"]
fix = ["elixir_fix"]
check = ["elixir_check"]
ci = ["elixir_ci"]
# ===================== Monorepo "all" aggregations ========================
# These run language tasks in a stable order: Rust, Python, TS, Elixir.
[tasks.all_fmt]
commands = ["rust_fmt", "py_fmt", "ts_fmt", "elixir_fmt"]
[tasks.all_lint]
commands = ["rust_lint_check", "py_lint", "ts_lint", "elixir_lint"]
[tasks.all_type]
commands = ["rust_type", "py_type", "ts_type", "elixir_type"]
[tasks.all_test]
commands = ["rust_test", "py_test", "ts_test", "elixir_test"]
[tasks.all_fix]
commands = ["rust_fix", "py_fix", "ts_fix", "elixir_fix"]
[tasks.all_check]
# No file writes. Equivalent to running each language's precommit gate.
commands = ["rust_check", "py_check", "ts_check", "elixir_check"]
[tasks.all_ci]
# Heavier CI gate that includes extras like audit/udeps and hygiene.
commands = ["rust_ci", "py_ci", "ts_ci", "elixir_ci"]
# ===================== Git ========================
[git]
# Optional overrides
# main_branch = "main"
# release_branch = "release-candidate"
# allowed_branch_tags = ["feat", "fix", "docs", "chore", "refactor", "perf", "test", "build", "ci"]
# ===================== Environment ========================
# Define required and optional environment variables for validation.
# Use `dev env check` to validate your .env file against these requirements.
[env]
# Required keys must be present and non-empty
# required = ["DATABASE_URL", "API_KEY", "SECRET_KEY"]
# Optional keys are checked but don't fail validation if missing
# optional = ["DEBUG", "LOG_LEVEL", "CACHE_TTL"]