summaryrefslogtreecommitdiff
path: root/.golangci.yml
blob: d0aa3e7b565fc521392113657ed9965b8b84dd0a (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
31
32
33
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
version: "2"
linters:
  default: all
  disable:
    - wsl # deprecated since v2.2.0
    - musttag # is broken, it complains that things should be tagged when they are tagged

    # Style I don't like.
    - lll
    - nlreturn
    - noinlineerr
    - nonamedreturns
    - varnamelen
    - wsl_v5

    # Complexity.
    - cyclop

    # Functional.
    - err113
    - exhaustruct

    # TODO?
    - mnd
    - noctx
    - wrapcheck
  settings:
    depguard:
      rules:
        main:
          allow:
            - $gostd
            - git.lukeshu.com/dashboard
    gosmopolitan:
      allow-time-local: true
    revive:
      enable-all-rules: true
      rules:
        - name: exported # "{thing} should have comment or be unexported"
          disabled: true
        - name: package-comments
          disabled: true
        - name: var-naming
          disabled: true
        - name: line-length-limit
          disabled: true
        - name: add-constant
          disabled: true
          arguments:
            - allow-ints: "0,1"
        - name: cognitive-complexity
          disabled: true
        - name: cyclomatic
          disabled: true
formatters:
  enable:
    - gci
    - gofmt
    - gofumpt
  settings:
    gci:
      sections:
        - standard
        - default
        - localmodule
    gofmt:
      simplify: true
issues:
  max-issues-per-linter: 0
  max-same-issues: 0
  uniq-by-line: false