|
| 1 | +version: "2" |
| 2 | + |
| 3 | +formatters: |
| 4 | + enable: |
| 5 | + - gci |
| 6 | + - gofumpt |
| 7 | + settings: |
| 8 | + gofumpt: |
| 9 | + extra-rules: true |
| 10 | + |
1 | 11 | linters: |
2 | | - enable-all: true |
| 12 | + default: all |
3 | 13 | disable: |
4 | | - - tenv # deprecated |
5 | | - - sqlclosecheck # not relevant (SQL) |
6 | | - - rowserrcheck # not relevant (SQL) |
7 | 14 | - cyclop # duplicate of gocyclo |
8 | | - - lll |
9 | 15 | - dupl |
10 | | - - prealloc |
11 | | - - wsl |
12 | | - - nlreturn |
13 | | - - mnd |
14 | | - - testpackage |
15 | | - - paralleltest |
16 | | - - tparallel |
17 | 16 | - err113 |
18 | | - - wrapcheck |
19 | 17 | - exhaustive |
20 | 18 | - exhaustruct |
21 | | - - varnamelen |
| 19 | + - lll |
| 20 | + - mnd |
22 | 21 | - nilnil |
| 22 | + - nlreturn |
| 23 | + - paralleltest |
| 24 | + - prealloc |
| 25 | + - rowserrcheck # not relevant (SQL) |
| 26 | + - sqlclosecheck # not relevant (SQL) |
| 27 | + - testpackage |
| 28 | + - tparallel |
| 29 | + - varnamelen |
| 30 | + - wrapcheck |
| 31 | + - wsl |
| 32 | + settings: |
| 33 | + depguard: |
| 34 | + rules: |
| 35 | + main: |
| 36 | + deny: |
| 37 | + - pkg: github.com/instana/testify |
| 38 | + desc: not allowed |
| 39 | + - pkg: github.com/pkg/errors |
| 40 | + desc: Should be replaced by standard lib errors package |
| 41 | + forbidigo: |
| 42 | + forbid: |
| 43 | + - pattern: ^print(ln)?$ |
| 44 | + - pattern: ^spew\.Print(f|ln)?$ |
| 45 | + - pattern: ^spew\.Dump$ |
| 46 | + funlen: |
| 47 | + lines: -1 |
| 48 | + statements: 40 |
| 49 | + goconst: |
| 50 | + min-len: 3 |
| 51 | + min-occurrences: 3 |
| 52 | + gocritic: |
| 53 | + disabled-checks: |
| 54 | + - sloppyReassign |
| 55 | + - rangeValCopy |
| 56 | + - octalLiteral |
| 57 | + - paramTypeCombine # already handle by gofumpt.extra-rules |
| 58 | + enabled-tags: |
| 59 | + - diagnostic |
| 60 | + - style |
| 61 | + - performance |
| 62 | + settings: |
| 63 | + hugeParam: |
| 64 | + sizeThreshold: 100 |
| 65 | + gocyclo: |
| 66 | + min-complexity: 12 |
| 67 | + godox: |
| 68 | + keywords: |
| 69 | + - FIXME |
| 70 | + gomoddirectives: |
| 71 | + replace-allow-list: |
| 72 | + - github.com/abbot/go-http-auth |
| 73 | + - github.com/go-check/check |
| 74 | + - github.com/gorilla/mux |
| 75 | + - github.com/mailgun/minheap |
| 76 | + - github.com/mailgun/multibuf |
| 77 | + - github.com/jaguilar/vt100 |
| 78 | + gosec: |
| 79 | + excludes: |
| 80 | + - G204 # Subprocess launched with a potential tainted input or cmd arguments |
| 81 | + - G301 # Expect directory permissions to be 0750 or less |
| 82 | + - G306 # Expect WriteFile permissions to be 0600 or less |
| 83 | + govet: |
| 84 | + disable: |
| 85 | + - fieldalignment |
| 86 | + enable-all: true |
| 87 | + misspell: |
| 88 | + locale: US |
23 | 89 |
|
24 | | -linters-settings: |
25 | | - govet: |
26 | | - enable-all: true |
27 | | - disable: |
28 | | - - fieldalignment |
29 | | - gocyclo: |
30 | | - min-complexity: 12 |
31 | | - goconst: |
32 | | - min-len: 3 |
33 | | - min-occurrences: 3 |
34 | | - misspell: |
35 | | - locale: US |
36 | | - gofumpt: |
37 | | - extra-rules: true |
38 | | - depguard: |
| 90 | + exclusions: |
| 91 | + presets: |
| 92 | + - comments |
39 | 93 | rules: |
40 | | - main: |
41 | | - deny: |
42 | | - - pkg: "github.com/instana/testify" |
43 | | - desc: not allowed |
44 | | - - pkg: "github.com/pkg/errors" |
45 | | - desc: Should be replaced by standard lib errors package |
46 | | - funlen: |
47 | | - lines: -1 |
48 | | - statements: 40 |
49 | | - godox: |
50 | | - keywords: |
51 | | - - FIXME |
52 | | - gocritic: |
53 | | - enabled-tags: |
54 | | - - diagnostic |
55 | | - - style |
56 | | - - performance |
57 | | - disabled-checks: |
58 | | - - sloppyReassign |
59 | | - - rangeValCopy |
60 | | - - octalLiteral |
61 | | - - paramTypeCombine # already handle by gofumpt.extra-rules |
62 | | - settings: |
63 | | - hugeParam: |
64 | | - sizeThreshold: 100 |
65 | | - forbidigo: |
66 | | - forbid: |
67 | | - - '^print(ln)?$' |
68 | | - - '^spew\.Print(f|ln)?$' |
69 | | - - '^spew\.Dump$' |
70 | | - gomoddirectives: |
71 | | - replace-allow-list: |
72 | | - - github.com/abbot/go-http-auth |
73 | | - - github.com/go-check/check |
74 | | - - github.com/gorilla/mux |
75 | | - - github.com/mailgun/minheap |
76 | | - - github.com/mailgun/multibuf |
77 | | - - github.com/jaguilar/vt100 |
78 | | - gosec: |
79 | | - excludes: |
80 | | - - G204 # Subprocess launched with a potential tainted input or cmd arguments |
81 | | - - G301 # Expect directory permissions to be 0750 or less |
82 | | - - G306 # Expect WriteFile permissions to be 0600 or less |
| 94 | + - linters: |
| 95 | + - gochecknoglobals |
| 96 | + - gochecknoinits |
| 97 | + path: cmd/ |
| 98 | + - linters: |
| 99 | + - tagalign |
| 100 | + path: internal/traefikv[1-3]/ |
| 101 | + - path: (.+)\.go$ |
| 102 | + text: 'ST1000: at least one file in a package should have a package comment' |
| 103 | + - path: (.+)\.go$ |
| 104 | + text: 'package-comments: should have a package comment' |
83 | 105 |
|
84 | 106 | issues: |
85 | | - exclude-use-default: false |
86 | 107 | max-issues-per-linter: 0 |
87 | 108 | max-same-issues: 0 |
88 | | - exclude: |
89 | | - - 'ST1000: at least one file in a package should have a package comment' |
90 | | - - 'package-comments: should have a package comment' |
91 | | - exclude-rules: |
92 | | - - path: cmd/ |
93 | | - linters: |
94 | | - - gochecknoglobals |
95 | | - - gochecknoinits |
96 | | - - path: internal/traefikv[1-3]/ |
97 | | - linters: |
98 | | - - tagalign |
99 | | - |
100 | | -output: |
101 | | - show-stats: true |
102 | | - sort-results: true |
103 | | - sort-order: |
104 | | - - linter |
105 | | - - file |
106 | | - |
107 | | -run: |
108 | | - timeout: 5m |
0 commit comments