.golangci.yaml 1.76 KB
Newer Older
1
version: "2"
Michael Yang's avatar
Michael Yang committed
2
linters:
3
  default: none
Michael Yang's avatar
Michael Yang committed
4
5
6
7
8
  enable:
    - asasalint
    - bidichk
    - bodyclose
    - containedctx
9
10
11
12
    - copyloopvar
    - errcheck
    - errorlint
    - exptostd
Michael Yang's avatar
Michael Yang committed
13
    - gocheckcompilerdirectives
Michael Yang's avatar
lint  
Michael Yang committed
14
15
    - govet
    - ineffassign
Michael Yang's avatar
Michael Yang committed
16
    - intrange
Michael Yang's avatar
lint  
Michael Yang committed
17
    - makezero
Michael Yang's avatar
Michael Yang committed
18
    - misspell
19
    - modernize
Michael Yang's avatar
Michael Yang committed
20
    - nilerr
21
    - nilnil
Michael Yang's avatar
Michael Yang committed
22
23
    - nolintlint
    - nosprintfhostport
24
25
26
    - perfsprint
    - prealloc
    - sloglint
Michael Yang's avatar
lint  
Michael Yang committed
27
    - staticcheck
Michael Yang's avatar
lint  
Michael Yang committed
28
    - unconvert
29
30
    - unused
    - usestdlibvars
31
    - usetesting
Michael Yang's avatar
lint  
Michael Yang committed
32
33
    - wastedassign
    - whitespace
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
  settings:
    errcheck:
      exclude-functions:
        - fmt.Fprintf
    perfsprint:
      strconcat: false
      concat-loop: false
    staticcheck:
      checks:
        - all
        # Using a deprecated function, variable, constant or field.
        # https://staticcheck.dev/docs/checks/#SA1019
        - -SA1019
        # Incorrect or missing package comment.
        # https://staticcheck.dev/docs/checks/#ST1000
        - -ST1000
        # Poorly chosen identifier.
        # https://staticcheck.dev/docs/checks/#ST1003
        - -ST1003
        # The documentation of an exported function should start with the function's name.
        # https://staticcheck.dev/docs/checks/#ST1020
        - -ST1020
        # The documentation of an exported type should start with type's name.
        # https://staticcheck.dev/docs/checks/#ST1021
        - -ST1021
        # The documentation of an exported variable or constant should start with variable's name.
        # https://staticcheck.dev/docs/checks/#ST1022
        - -ST1022
    usestdlibvars:
      http-method: false
      http-status-code: false

formatters:
  enable:
    - gci
    - gofmt
    - gofumpt
  settings:
    gci:
      sections:
        - standard
        - default
        - localmodule