summaryrefslogtreecommitdiff
path: root/Taskfile.go.yaml
blob: 495aa594d1d512cac256efc2bd2e64f3b2250b84 (plain)
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
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"

tasks:
  test:
    desc: run go tests
    cmd: go test -v ./...

  test:coverage:
    desc: run go tests
    cmds:
      - cmd: go test -v  -coverprofile=tmp/cover.out ./...
      - cmd: go tool cover -html=tmp/cover.out -o=tmp/cover.html
      - cmd: xdg-open tmp/cover.html

  docs:
    desc: open autogenerated code documentation
    cmd: go tool pkgsite -open

  lint:
    desc: run various linters
    cmds:
      - cmd: golangci-lint version
      - cmd: golangci-lint run

  lint:fix:
    desc: run various linters
    cmds:
      - cmd: golangci-lint version
      - cmd: golangci-lint run --fix