.golangci.yaml 1.77 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
14
    - gocritic
Michael Yang's avatar
lint  
Michael Yang committed
15
16
    - govet
    - ineffassign
Michael Yang's avatar
Michael Yang committed
17
    - intrange
Michael Yang's avatar
lint  
Michael Yang committed
18
    - makezero
Michael Yang's avatar
Michael Yang committed
19
    - misspell
20
    - modernize
Michael Yang's avatar
Michael Yang committed
21
    - nilerr
22
    - nilnil
Michael Yang's avatar
Michael Yang committed
23
24
    - nolintlint
    - nosprintfhostport
25
26
27
    - perfsprint
    - prealloc
    - sloglint
Michael Yang's avatar
lint  
Michael Yang committed
28
    - staticcheck
Michael Yang's avatar
lint  
Michael Yang committed
29
    - unconvert
30
31
    - unused
    - usestdlibvars
32
    - usetesting
Michael Yang's avatar
lint  
Michael Yang committed
33
34
    - wastedassign
    - whitespace
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
  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