|
| 1 | +version: "2" |
| 2 | +run: |
| 3 | + go: "1.23" |
| 4 | + tests: true |
| 5 | + allow-parallel-runners: true |
| 6 | +linters: |
| 7 | + default: all |
| 8 | + disable: |
| 9 | + - cyclop |
| 10 | + - depguard |
| 11 | + - err113 |
| 12 | + - exhaustive |
| 13 | + - exhaustruct |
| 14 | + - forcetypeassert |
| 15 | + - funlen |
| 16 | + - gochecknoglobals |
| 17 | + - gocognit |
| 18 | + - godox |
| 19 | + - gosmopolitan |
| 20 | + - inamedparam |
| 21 | + - interfacebloat |
| 22 | + - mnd |
| 23 | + - nlreturn |
| 24 | + - nonamedreturns |
| 25 | + - paralleltest |
| 26 | + - testpackage |
| 27 | + - thelper |
| 28 | + - varnamelen |
| 29 | + - wrapcheck |
| 30 | + - wsl |
| 31 | + settings: |
| 32 | + errorlint: |
| 33 | + errorf: true |
| 34 | + asserts: true |
| 35 | + comparison: true |
| 36 | + exhaustive: |
| 37 | + default-signifies-exhaustive: true |
| 38 | + forbidigo: |
| 39 | + forbid: |
| 40 | + - pattern: Geoip |
| 41 | + msg: you should use `GeoIP` |
| 42 | + - pattern: geoIP |
| 43 | + msg: you should use `geoip` |
| 44 | + - pattern: Maxmind |
| 45 | + msg: you should use `MaxMind` |
| 46 | + - pattern: ^maxMind |
| 47 | + msg: you should use `maxmind` |
| 48 | + - pattern: Minfraud |
| 49 | + msg: you should use `MinFraud` |
| 50 | + - pattern: ^minFraud |
| 51 | + msg: you should use `minfraud` |
| 52 | + - pattern: ^math.Max$ |
| 53 | + msg: you should use the max built-in instead. |
| 54 | + - pattern: ^math.Min$ |
| 55 | + msg: you should use the min built-in instead. |
| 56 | + - pattern: ^os.IsNotExist |
| 57 | + msg: As per their docs, new code should use errors.Is(err, fs.ErrNotExist). |
| 58 | + - pattern: ^os.IsExist |
| 59 | + msg: As per their docs, new code should use errors.Is(err, fs.ErrExist) |
| 60 | + gosec: |
| 61 | + excludes: |
| 62 | + - G115 |
| 63 | + govet: |
| 64 | + disable: |
| 65 | + - shadow |
| 66 | + enable-all: true |
| 67 | + lll: |
| 68 | + line-length: 120 |
| 69 | + tab-width: 4 |
| 70 | + misspell: |
| 71 | + locale: US |
| 72 | + extra-words: |
| 73 | + - typo: marshall |
| 74 | + correction: marshal |
| 75 | + - typo: marshalling |
| 76 | + correction: marshaling |
| 77 | + - typo: marshalls |
| 78 | + correction: marshals |
| 79 | + - typo: unmarshall |
| 80 | + correction: unmarshal |
| 81 | + - typo: unmarshalling |
| 82 | + correction: unmarshaling |
| 83 | + - typo: unmarshalls |
| 84 | + correction: unmarshals |
| 85 | + nolintlint: |
| 86 | + require-explanation: true |
| 87 | + require-specific: true |
| 88 | + allow-no-explanation: |
| 89 | + - lll |
| 90 | + - misspell |
| 91 | + allow-unused: false |
| 92 | + revive: |
| 93 | + severity: warning |
| 94 | + enable-all-rules: true |
| 95 | + rules: |
| 96 | + - name: add-constant |
| 97 | + disabled: true |
| 98 | + - name: cognitive-complexity |
| 99 | + disabled: true |
| 100 | + - name: confusing-naming |
| 101 | + disabled: true |
| 102 | + - name: confusing-results |
| 103 | + disabled: true |
| 104 | + - name: cyclomatic |
| 105 | + disabled: true |
| 106 | + - name: deep-exit |
| 107 | + disabled: true |
| 108 | + - name: flag-parameter |
| 109 | + disabled: true |
| 110 | + - name: function-length |
| 111 | + disabled: true |
| 112 | + - name: function-result-limit |
| 113 | + disabled: true |
| 114 | + - name: line-length-limit |
| 115 | + disabled: true |
| 116 | + - name: max-public-structs |
| 117 | + disabled: true |
| 118 | + - name: nested-structs |
| 119 | + disabled: true |
| 120 | + - name: unchecked-type-assertion |
| 121 | + disabled: true |
| 122 | + - name: unhandled-error |
| 123 | + disabled: true |
| 124 | + tagliatelle: |
| 125 | + case: |
| 126 | + rules: |
| 127 | + avro: snake |
| 128 | + bson: snake |
| 129 | + env: upperSnake |
| 130 | + envconfig: upperSnake |
| 131 | + json: snake |
| 132 | + mapstructure: snake |
| 133 | + xml: snake |
| 134 | + yaml: snake |
| 135 | + unparam: |
| 136 | + check-exported: true |
| 137 | + exclusions: |
| 138 | + generated: lax |
| 139 | + presets: |
| 140 | + - comments |
| 141 | + - common-false-positives |
| 142 | + - legacy |
| 143 | + - std-error-handling |
| 144 | + rules: |
| 145 | + - linters: |
| 146 | + - govet |
| 147 | + - revive |
| 148 | + path: _test.go |
| 149 | + text: 'fieldalignment:' |
| 150 | + paths: |
| 151 | + - third_party$ |
| 152 | + - builtin$ |
| 153 | + - examples$ |
| 154 | +formatters: |
| 155 | + enable: |
| 156 | + - gci |
| 157 | + - gofmt |
| 158 | + - gofumpt |
| 159 | + - goimports |
| 160 | + - golines |
| 161 | + settings: |
| 162 | + gci: |
| 163 | + sections: |
| 164 | + - standard |
| 165 | + - default |
| 166 | + - prefix(github.com/oschwald/geoip2-golang) |
| 167 | + gofumpt: |
| 168 | + extra-rules: true |
| 169 | + exclusions: |
| 170 | + generated: lax |
| 171 | + paths: |
| 172 | + - third_party$ |
| 173 | + - builtin$ |
| 174 | + - examples$ |
0 commit comments