File: .golangci.yml

package info (click to toggle)
golang-github-oschwald-maxminddb-golang-v2 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,132 kB
  • sloc: perl: 557; makefile: 3
file content (175 lines) | stat: -rw-r--r-- 4,271 bytes parent folder | download
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
version: "2"
run:
  go: "1.24"
  tests: true
  allow-parallel-runners: true
linters:
  default: all
  disable:
    - cyclop
    - depguard
    - err113
    - exhaustive
    - exhaustruct
    - forcetypeassert
    - funlen
    - gochecknoglobals
    - gocognit
    - godox
    - gosmopolitan
    - inamedparam
    - interfacebloat
    # Seems unstable. It will sometimes fire and other times not.
    - ireturn
    - lll
    - mnd
    - nlreturn
    - noinlineerr
    - nonamedreturns
    - paralleltest
    - testpackage
    - thelper
    - varnamelen
    - wrapcheck
    - wsl
    - wsl_v5
  settings:
    errcheck:
      exclude-functions:
        - (*github.com/oschwald/maxminddb-golang/v2.Reader).Close
    errorlint:
      errorf: true
      asserts: true
      comparison: true
    exhaustive:
      default-signifies-exhaustive: true
    forbidigo:
      forbid:
        - pattern: Geoip
          msg: you should use `GeoIP`
        - pattern: geoIP
          msg: you should use `geoip`
        - pattern: Maxmind
          msg: you should use `MaxMind`
        - pattern: ^maxMind
          msg: you should use `maxmind`
        - pattern: Minfraud
          msg: you should use `MinFraud`
        - pattern: ^minFraud
          msg: you should use `minfraud`
        - pattern: ^math.Max$
          msg: you should use the max built-in instead.
        - pattern: ^math.Min$
          msg: you should use the min built-in instead.
        - pattern: ^os.IsNotExist
          msg: As per their docs, new code should use errors.Is(err, fs.ErrNotExist).
        - pattern: ^os.IsExist
          msg: As per their docs, new code should use errors.Is(err, fs.ErrExist)
    gosec:
      excludes:
        - G115
        # Potential file inclusion via variable - we only open files asked by
        # the user of the API.
        - G304
    govet:
      disable:
        - shadow
      enable-all: true
    lll:
      line-length: 120
      tab-width: 4
    misspell:
      locale: US
      extra-words:
        - typo: marshall
          correction: marshal
        - typo: marshalling
          correction: marshaling
        - typo: marshalls
          correction: marshals
        - typo: unmarshall
          correction: unmarshal
        - typo: unmarshalling
          correction: unmarshaling
        - typo: unmarshalls
          correction: unmarshals
    nolintlint:
      require-explanation: true
      require-specific: true
      allow-no-explanation:
        - lll
        - misspell
      allow-unused: false
    revive:
      severity: warning
      enable-all-rules: true
      rules:
        - name: add-constant
          disabled: true
        - name: cognitive-complexity
          disabled: true
        - name: confusing-naming
          disabled: true
        - name: confusing-results
          disabled: true
        - name: cyclomatic
          disabled: true
        - name: deep-exit
          disabled: true
        - name: flag-parameter
          disabled: true
        - name: function-length
          disabled: true
        - name: function-result-limit
          disabled: true
        - name: line-length-limit
          disabled: true
        - name: max-public-structs
          disabled: true
        - name: nested-structs
          disabled: true
        - name: package-directory-mismatch
          severity: warning
          arguments:
            - ignore-directories:
                - maxminddb-golang
        - name: unchecked-type-assertion
          disabled: true
        - name: unhandled-error
          disabled: true
    tagliatelle:
      case:
        rules:
          avro: snake
          bson: snake
          env: upperSnake
          envconfig: upperSnake
          json: snake
          mapstructure: snake
          xml: snake
          yaml: snake
    unparam:
      check-exported: true
  exclusions:
    warn-unused: true
    rules:
      - linters:
          - govet
          - revive
        path: _test.go
        text: 'fieldalignment:'
formatters:
  enable:
    - gci
    - gofmt
    - gofumpt
    - goimports
    - golines
  settings:
    gci:
      sections:
        - standard
        - default
        - prefix(github.com/oschwald/maxminddb-golang)
    gofumpt:
      extra-rules: true