1# https://taskfile.dev
2
3version: "3"
4
5tasks:
6 lint:
7 desc: Run base linters
8 cmds:
9 - golangci-lint run
10
11 test:
12 desc: Run tests
13 cmds:
14 - go test ./... {{.CLI_ARGS}}
15
16 fmt:
17 desc: Run gofumpt
18 cmds:
19 - gofumpt -w .
20
21 dev:
22 desc: Run with profiling enabled
23 env:
24 OPENCODE_PROFILE: true
25 cmds:
26 - go run .
27
28 profile:cpu:
29 desc: 10s CPU profile
30 cmds:
31 - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/profile?seconds=10'
32
33 profile:heap:
34 desc: Heap profile
35 cmds:
36 - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/heap'
37
38 profile:allocs:
39 desc: Allocations profile
40 cmds:
41 - go tool pprof -http :6061 'http://localhost:6060/debug/pprof/allocs'