|
1 | | -service: |
2 | | - golangci-lint-version: 1.61.x # use the fixed version to not introduce new linters unexpectedly |
3 | | - |
| 1 | +version: "2" |
4 | 2 | run: |
5 | 3 | concurrency: 4 |
6 | | - # timeout for analysis, e.g. 30s, 5m, default is 1m |
7 | 4 | timeout: 20m |
8 | 5 | build-tags: |
9 | 6 | - integ |
10 | 7 | - integfuzz |
11 | | - |
12 | 8 | linters: |
13 | | - disable-all: true |
| 9 | + default: none |
14 | 10 | enable: |
15 | | - - unused |
16 | | - - errcheck |
| 11 | + - asciicheck |
17 | 12 | - copyloopvar |
| 13 | + - errcheck |
18 | 14 | - gocritic |
19 | | - - gofumpt |
20 | | - - goimports |
21 | | - - revive |
22 | | - - gosimple |
| 15 | + - gosec |
23 | 16 | - govet |
24 | 17 | - ineffassign |
25 | 18 | - lll |
| 19 | + - makezero |
26 | 20 | - misspell |
| 21 | + - prealloc |
| 22 | + - predeclared |
| 23 | + - revive |
27 | 24 | - staticcheck |
28 | | - - stylecheck |
29 | | - - typecheck |
30 | 25 | - unconvert |
31 | 26 | - unparam |
| 27 | + - unused |
| 28 | + settings: |
| 29 | + errcheck: |
| 30 | + check-type-assertions: false |
| 31 | + check-blank: false |
| 32 | + gocritic: |
| 33 | + disabled-checks: |
| 34 | + - exitAfterDefer |
| 35 | + gosec: |
| 36 | + excludes: |
| 37 | + - G401 |
| 38 | + - G402 |
| 39 | + - G404 |
| 40 | + - G501 |
| 41 | + - G115 |
| 42 | + severity: low |
| 43 | + confidence: low |
| 44 | + govet: |
| 45 | + disable: |
| 46 | + - shadow |
| 47 | + lll: |
| 48 | + line-length: 160 |
| 49 | + tab-width: 1 |
| 50 | + misspell: |
| 51 | + locale: US |
| 52 | + ignore-rules: |
| 53 | + - cancelled |
| 54 | + - marshalled |
| 55 | + unparam: |
| 56 | + check-exported: false |
| 57 | + exclusions: |
| 58 | + generated: lax |
| 59 | + presets: |
| 60 | + - comments |
| 61 | + - common-false-positives |
| 62 | + - legacy |
| 63 | + - std-error-handling |
| 64 | + rules: |
| 65 | + - linters: |
| 66 | + - errcheck |
| 67 | + - maligned |
| 68 | + path: _test\.go$|^tests/|^samples/ |
| 69 | + - linters: |
| 70 | + - revive |
| 71 | + - staticcheck |
| 72 | + text: use underscores in Go names |
| 73 | + - linters: |
| 74 | + - revive |
| 75 | + text: unused-parameter |
| 76 | + - linters: |
| 77 | + - unparam |
| 78 | + text: is always false |
| 79 | + paths: |
| 80 | + - .*\.pb\.go |
| 81 | + - .*\.gen\.go |
| 82 | + - genfiles$ |
| 83 | + - vendor$ |
| 84 | + - bin$ |
| 85 | + - third_party$ |
| 86 | + - builtin$ |
| 87 | + - examples$ |
| 88 | +formatters: |
| 89 | + enable: |
32 | 90 | - gci |
33 | | - - gosec |
34 | | - - asciicheck |
35 | | - - prealloc |
36 | | - - predeclared |
37 | | - - makezero |
38 | | - fast: false |
39 | | - |
40 | | -linters-settings: |
41 | | - errcheck: |
42 | | - # report about not checking of errors in type assetions: `a := b.(MyStruct)`; |
43 | | - # default is false: such cases aren't reported by default. |
44 | | - check-type-assertions: false |
45 | | - |
46 | | - # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; |
47 | | - # default is false: such cases aren't reported by default. |
48 | | - check-blank: false |
49 | | - govet: |
50 | | - # report about shadowed variables |
51 | | - disable: |
52 | | - - shadow |
53 | | - maligned: |
54 | | - # print struct with more effective memory layout or not, false by default |
55 | | - suggest-new: true |
56 | | - misspell: |
57 | | - # Correct spellings using locale preferences for US or UK. |
58 | | - # Default is to use a neutral variety of English. |
59 | | - # Setting locale to US will correct the British spelling of 'colour' to 'color'. |
60 | | - locale: US |
61 | | - ignore-words: |
62 | | - - cancelled |
63 | | - - marshalled |
64 | | - lll: |
65 | | - # max line length, lines longer will be reported. Default is 120. |
66 | | - # '\t' is counted as 1 character by default, and can be changed with the tab-width option |
67 | | - line-length: 160 |
68 | | - # tab width in spaces. Default to 1. |
69 | | - tab-width: 1 |
70 | | - gocritic: |
71 | | - disabled-checks: |
72 | | - - exitAfterDefer |
73 | | - unused: |
74 | | - check-exported: false |
75 | | - unparam: |
76 | | - # Inspect exported functions, default is false. Set to true if no external program/library imports your code. |
77 | | - # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: |
78 | | - # if it's called for subdir of a project it can't find external interfaces. All text editor integrations |
79 | | - # with golangci-lint call it on a directory with the changed file. |
80 | | - check-exported: false |
81 | | - gci: |
82 | | - sections: |
83 | | - - standard |
84 | | - - default |
85 | | - - prefix(github.com/fatedier/frp/) |
86 | | - gosec: |
87 | | - severity: "low" |
88 | | - confidence: "low" |
89 | | - excludes: |
90 | | - - G401 |
91 | | - - G402 |
92 | | - - G404 |
93 | | - - G501 |
94 | | - - G115 # integer overflow conversion |
95 | | - |
| 91 | + - gofumpt |
| 92 | + - goimports |
| 93 | + settings: |
| 94 | + gci: |
| 95 | + sections: |
| 96 | + - standard |
| 97 | + - default |
| 98 | + - prefix(github.com/fatedier/frp/) |
| 99 | + exclusions: |
| 100 | + generated: lax |
| 101 | + paths: |
| 102 | + - .*\.pb\.go |
| 103 | + - .*\.gen\.go |
| 104 | + - genfiles$ |
| 105 | + - vendor$ |
| 106 | + - bin$ |
| 107 | + - third_party$ |
| 108 | + - builtin$ |
| 109 | + - examples$ |
96 | 110 | issues: |
97 | | - # List of regexps of issue texts to exclude, empty list by default. |
98 | | - # But independently from this option we use default exclude patterns, |
99 | | - # it can be disabled by `exclude-use-default: false`. To list all |
100 | | - # excluded by default patterns execute `golangci-lint run --help` |
101 | | - # exclude: |
102 | | - # - composite literal uses unkeyed fields |
103 | | - |
104 | | - exclude-rules: |
105 | | - # Exclude some linters from running on test files. |
106 | | - - path: _test\.go$|^tests/|^samples/ |
107 | | - linters: |
108 | | - - errcheck |
109 | | - - maligned |
110 | | - - linters: |
111 | | - - revive |
112 | | - - stylecheck |
113 | | - text: "use underscores in Go names" |
114 | | - - linters: |
115 | | - - revive |
116 | | - text: "unused-parameter" |
117 | | - - linters: |
118 | | - - unparam |
119 | | - text: "is always false" |
120 | | - |
121 | | - exclude-dirs: |
122 | | - - genfiles$ |
123 | | - - vendor$ |
124 | | - - bin$ |
125 | | - exclude-files: |
126 | | - - ".*\\.pb\\.go" |
127 | | - - ".*\\.gen\\.go" |
128 | | - |
129 | | - # Independently from option `exclude` we use default exclude patterns, |
130 | | - # it can be disabled by this option. To list all |
131 | | - # excluded by default patterns execute `golangci-lint run --help`. |
132 | | - # Default value for this option is true. |
133 | | - exclude-use-default: true |
134 | | - |
135 | | - # Maximum issues count per one linter. Set to 0 to disable. Default is 50. |
136 | | - max-per-linter: 0 |
137 | | - |
138 | | - # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. |
| 111 | + max-issues-per-linter: 0 |
139 | 112 | max-same-issues: 0 |
0 commit comments