all repos

anpi @ 2ef9e52b45dd5ef6b734c944cf861c4e633597ad

yaml to anki importer

anpi/.golangci.yml (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
setup linter, 1 year ago
1
version: "2"
2
run:
3
  concurrency: 8
4
  issues-exit-code: 1
5
  tests: true
6
linters:
7
  default: none
8
  enable:
9
    - asasalint
10
    - asciicheck
11
    - bidichk
12
    - copyloopvar
13
    - cyclop
14
    - decorder
15
    - dupl
16
    - durationcheck
17
    - err113
18
    - errcheck
19
    - errname
20
    - errorlint
21
    - exhaustive
22
    - fatcontext
23
    - forbidigo
24
    - funlen
25
    - gocheckcompilerdirectives
26
    - gochecknoglobals
27
    - gochecknoinits
28
    - gochecksumtype
29
    - gocognit
30
    - goconst
31
    - gocritic
32
    - gocyclo
33
    - godot
34
    - goprintffuncname
35
    - gosec
36
    - govet
37
    - inamedparam
38
    - ineffassign
39
    - interfacebloat
40
    - lll
41
    - loggercheck
42
    - makezero
43
    - mirror
44
    - mnd
45
    - musttag
46
    - nakedret
47
    - nestif
48
    - nilerr
49
    - nilnil
50
    - noctx
51
    - nolintlint
52
    - nonamedreturns
53
    - nosprintfhostport
54
    - perfsprint
55
    - prealloc
56
    - predeclared
57
    - promlinter
58
    - reassign
59
    - revive
60
    - rowserrcheck
61
    - sloglint
62
    - staticcheck
63
    - tagalign
64
    - testableexamples
65
    - testifylint
66
    - testpackage
67
    - thelper
68
    - tparallel
69
    - unconvert
70
    - unparam
71
    - unused
72
    - usestdlibvars
73
    - wastedassign
74
    - whitespace
75
  settings:
76
    errcheck:
77
      check-type-assertions: true
78
      check-blank: true
79
    funlen:
80
      ignore-comments: true
81
    gocognit:
82
      min-complexity: 15
83
    gocritic:
84
      enable-all: true
85
    gocyclo:
86
      min-complexity: 15
87
    govet:
88
      enable-all: true
89
    interfacebloat:
90
      max: 3
91
    nolintlint:
92
      require-explanation: true
93
      require-specific: true
94
      allow-unused: false
95
    revive:
96
      confidence: 0.1
97
      rules:
98
        - name: exported
99
          disabled: true
100
    staticcheck:
101
      checks:
102
        - all
103
    testifylint:
104
      enable-all: true
105
  exclusions:
106
    generated: lax
107
    rules:
108
      - linters:
109
          - gocritic
110
        source: //noinspection
111
      - linters:
112
          - dupl
113
          - err113
114
          - funlen
115
          - gochecknoglobals
116
          - goconst
117
          - gosec
118
          - noctx
119
          - staticcheck
120
        path: _test\.go
121
      - path: (.+)\.go$
122
        text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv|.*Rollback). is not checked
123
      - path: (.+)\.go$
124
        text: should check returned error before deferring
125
      - path: (.+)\.go$
126
        text: (ST1000|ST1003|ST1020|ST1021)
127
    paths:
128
      - bin
129
      - vendor
130
      - third_party$
131
      - builtin$
132
      - examples$
133
issues:
134
  max-same-issues: 50
135
formatters:
136
  enable:
137
    - goimports
138
  exclusions:
139
    generated: lax
140
    paths:
141
      - bin
142
      - vendor
143
      - third_party$
144
      - builtin$
145
      - examples$