all repos

anpi @ a098b821462a52cf06781875ff519401b967e154

yaml to anki importer

anpi/.golangci.yml (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
fix linter errors, 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
    - testableexamples
64
    - testifylint
65
    - testpackage
66
    - thelper
67
    - tparallel
68
    - unconvert
69
    - unparam
70
    - unused
71
    - usestdlibvars
72
    - wastedassign
73
    - whitespace
74
  settings:
75
    errcheck:
76
      check-type-assertions: true
77
      check-blank: true
78
    funlen:
79
      ignore-comments: true
80
    gocognit:
81
      min-complexity: 15
82
    gocritic:
83
      enable-all: true
84
    gocyclo:
85
      min-complexity: 15
86
    govet:
87
      disable:
88
        - fieldalignment
89
      enable-all: true
90
    interfacebloat:
91
      max: 3
92
    nolintlint:
93
      require-explanation: true
94
      require-specific: true
95
      allow-unused: false
96
    revive:
97
      confidence: 0.1
98
      rules:
99
        - name: exported
100
          disabled: true
101
    staticcheck:
102
      checks:
103
        - all
104
    testifylint:
105
      enable-all: true
106
  exclusions:
107
    generated: lax
108
    rules:
109
      - linters:
110
          - gocritic
111
        source: //noinspection
112
      - linters:
113
          - dupl
114
          - err113
115
          - funlen
116
          - gochecknoglobals
117
          - goconst
118
          - gosec
119
          - noctx
120
          - staticcheck
121
        path: _test\.go
122
      - path: (.+)\.go$
123
        text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv|.*Rollback). is not checked
124
      - path: (.+)\.go$
125
        text: should check returned error before deferring
126
      - path: (.+)\.go$
127
        text: (ST1000|ST1003|ST1020|ST1021)
128
    paths:
129
      - bin
130
      - vendor
131
      - third_party$
132
      - builtin$
133
      - examples$
134
issues:
135
  max-same-issues: 50
136
formatters:
137
  enable:
138
    - goimports
139
  exclusions:
140
    generated: lax
141
    paths:
142
      - bin
143
      - vendor
144
      - third_party$
145
      - builtin$
146
      - examples$