-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
51 lines (44 loc) · 881 Bytes
/
Taskfile.yml
File metadata and controls
51 lines (44 loc) · 881 Bytes
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
version: '3'
tasks:
default:
desc: Show available tasks
cmds:
- task --list
fmt:
desc: Format all code
cmds:
- task: fmt:nix
- task: fmt:go
fmt:nix:
desc: Format Nix files
cmds:
- nix fmt
sources:
- '**/*.nix'
- flake.lock
fmt:go:
desc: Format Go files
cmds:
- gofumpt -w .
- golines -w --max-len=120 --base-formatter=gofumpt .
sources:
- '**/*.go'
preconditions:
- sh: command -v gofumpt
msg: "gofumpt not found. Run: direnv allow"
- sh: command -v golines
msg: "golines not found. Run: direnv allow"
lint:
desc: Run all linters
cmds:
- task: lint:go
lint:go:
desc: Lint Go code
cmds:
- golangci-lint run ./...
sources:
- '**/*.go'
- .golangci.yml
check:
cmds:
- goreleaser check