|
1 |
| -# https://golangci-lint.run/usage/configuration/ |
| 1 | +# https://golangci-lint.run/usage/configuration |
2 | 2 | #
|
3 | 3 | # This file is for linters that might be interesting to enforce in the future.
|
4 | 4 | # Rules that should be enforced immediately belong in [.golangci.yaml].
|
5 | 5 | #
|
6 | 6 | # Both files are used by [.github/workflows/lint.yaml].
|
| 7 | +version: "2" |
7 | 8 |
|
| 9 | +# https://golangci-lint.run/usage/linters |
8 | 10 | linters:
|
9 |
| - disable-all: true |
10 |
| - enable: |
11 |
| - - contextcheck |
12 |
| - - err113 |
13 |
| - - gocritic |
14 |
| - - godot |
15 |
| - - godox |
16 |
| - - gofumpt |
17 |
| - - gosec # exclude-use-default |
18 |
| - - nilnil |
| 11 | + default: all |
| 12 | + disable: |
| 13 | + - asasalint |
| 14 | + - asciicheck |
| 15 | + - bidichk |
| 16 | + - bodyclose |
| 17 | + - copyloopvar |
| 18 | + - depguard |
| 19 | + - dupword |
| 20 | + - durationcheck |
| 21 | + - errchkjson |
| 22 | + - errname |
| 23 | + - errorlint |
| 24 | + - exhaustive |
| 25 | + - exptostd |
| 26 | + - fatcontext |
| 27 | + - forbidigo |
| 28 | + - ginkgolinter |
| 29 | + - gocheckcompilerdirectives |
| 30 | + - gochecksumtype |
| 31 | + - goheader |
| 32 | + - gomoddirectives |
| 33 | + - gomodguard |
| 34 | + - goprintffuncname |
| 35 | + - gosmopolitan |
| 36 | + - grouper |
| 37 | + - iface |
| 38 | + - importas |
| 39 | + - interfacebloat |
| 40 | + - intrange |
| 41 | + - loggercheck |
| 42 | + - makezero |
| 43 | + - mirror |
| 44 | + - misspell |
| 45 | + - musttag |
| 46 | + - nilerr |
| 47 | + - nilnesserr |
| 48 | + - noctx |
19 | 49 | - nolintlint
|
20 |
| - - predeclared |
21 |
| - - revive |
22 |
| - - staticcheck # exclude-use-default |
23 |
| - - tenv |
24 |
| - - thelper |
25 |
| - - tparallel |
| 50 | + - nosprintfhostport |
| 51 | + - prealloc |
| 52 | + - promlinter |
| 53 | + - protogetter |
| 54 | + - reassign |
| 55 | + - recvcheck |
| 56 | + - rowserrcheck |
| 57 | + - sloglint |
| 58 | + - spancheck |
| 59 | + - sqlclosecheck |
| 60 | + - tagalign |
| 61 | + - testifylint |
| 62 | + - unconvert |
| 63 | + - unparam |
| 64 | + - usestdlibvars |
| 65 | + - usetesting |
26 | 66 | - wastedassign
|
27 |
| - presets: |
28 |
| - - performance |
| 67 | + - wsl |
| 68 | + - zerologlint |
29 | 69 |
|
30 |
| -issues: |
31 |
| - exclude-rules: |
32 |
| - # We call external linters when they are installed: Flake8, ShellCheck, etc. |
33 |
| - - linters: [gosec] |
34 |
| - path: '_test[.]go$' |
35 |
| - text: 'G204: Subprocess launched with variable' |
| 70 | + settings: |
| 71 | + thelper: |
| 72 | + # https://github.com/kulti/thelper/issues/27 |
| 73 | + tb: { begin: true, first: true } |
| 74 | + test: { begin: true, first: true, name: true } |
| 75 | + |
| 76 | + exclusions: |
| 77 | + warn-unused: true |
| 78 | + # Ignore built-in exclusions |
| 79 | + presets: [] |
| 80 | + rules: |
| 81 | + # We call external linters when they are installed: Flake8, ShellCheck, etc. |
| 82 | + - linters: [gosec] |
| 83 | + path: '_test[.]go$' |
| 84 | + text: 'G204: Subprocess launched with variable' |
36 | 85 |
|
37 |
| - # https://github.com/golangci/golangci-lint/issues/2239 |
38 |
| - exclude-use-default: false |
| 86 | +# https://golangci-lint.run/usage/formatters |
| 87 | +formatters: |
| 88 | + enable: |
| 89 | + - gofumpt |
| 90 | + |
| 91 | +issues: |
| 92 | + # Fix only when requested |
| 93 | + fix: false |
39 | 94 |
|
40 |
| -linters-settings: |
41 |
| - thelper: |
42 |
| - # https://github.com/kulti/thelper/issues/27 |
43 |
| - tb: { begin: true, first: true } |
44 |
| - test: { begin: true, first: true, name: true } |
| 95 | + # Show all issues at once |
| 96 | + max-issues-per-linter: 0 |
| 97 | + max-same-issues: 0 |
| 98 | + uniq-by-line: false |
0 commit comments