|
1 | | -linters-settings: |
2 | | - errcheck: |
3 | | - check-type-assertions: true |
4 | | - exhaustruct: |
5 | | - include: |
6 | | - # No zero values for param structs. |
7 | | - - 'connectrpc\.com/grpchealth\..*[pP]arams' |
8 | | - forbidigo: |
9 | | - forbid: |
10 | | - - '^fmt\.Print' |
11 | | - - '^log\.' |
12 | | - - '^print$' |
13 | | - - '^println$' |
14 | | - - '^panic$' |
15 | | - godox: |
16 | | - # TODO, OPT, etc. comments are fine to commit. Use FIXME comments for |
17 | | - # temporary hacks, and use godox to prevent committing them. |
18 | | - keywords: [FIXME] |
19 | | - varnamelen: |
20 | | - ignore-decls: |
21 | | - - T any |
22 | | - - i int |
23 | | - - 't *testing.T' |
24 | | - - tb testing.TB |
25 | | - - wg sync.WaitGroup |
| 1 | +version: "2" |
26 | 2 | linters: |
27 | | - enable-all: true |
| 3 | + default: all |
28 | 4 | disable: |
29 | 5 | - cyclop # covered by gocyclo |
30 | 6 | - depguard # unnecessary for small libraries |
31 | | - - execinquery # deprecated in golangci 1.58.0 |
32 | 7 | - funlen # rely on code review to limit function length |
33 | 8 | - gocognit # dubious "cognitive overhead" quantification |
34 | | - - gofumpt # prefer standard gofmt |
35 | | - - goimports # rely on gci instead |
36 | | - - gomnd # some unnamed constants are okay |
37 | 9 | - inamedparam # convention is not followed |
38 | 10 | - ireturn # "accept interfaces, return structs" isn't ironclad |
39 | 11 | - lll # don't want hard limits for line length |
40 | 12 | - maintidx # covered by gocyclo |
| 13 | + - mnd # some unnamed constants are okay |
41 | 14 | - nlreturn # generous whitespace violates house style |
42 | 15 | - nonamedreturns # named returns are fine; it's *bare* returns that are bad |
43 | | - - protogetter # too many false positives |
44 | 16 | - testpackage # internal tests are fine |
45 | 17 | - wrapcheck # don't _always_ need to wrap errors |
46 | 18 | - wsl # generous whitespace violates house style |
47 | | -issues: |
48 | | - exclude-dirs-use-default: false |
49 | | - exclude: |
50 | | - # Don't ban use of fmt.Errorf to create new errors, but the remaining |
51 | | - # checks from err113 are useful. |
52 | | - - "do not define dynamic errors.*" |
| 19 | + settings: |
| 20 | + errcheck: |
| 21 | + check-type-assertions: true |
| 22 | + exhaustruct: |
| 23 | + include: |
| 24 | + # No zero values for param structs. |
| 25 | + - connectrpc\.com/grpchealth\..*[pP]arams |
| 26 | + forbidigo: |
| 27 | + forbid: |
| 28 | + - pattern: ^fmt\.Print |
| 29 | + - pattern: ^log\. |
| 30 | + - pattern: ^print$ |
| 31 | + - pattern: ^println$ |
| 32 | + - pattern: ^panic$ |
| 33 | + godox: |
| 34 | + # TODO, OPT, etc. comments are fine to commit. Use FIXME comments for |
| 35 | + # temporary hacks, and use godox to prevent committing them. |
| 36 | + keywords: |
| 37 | + - FIXME |
| 38 | + varnamelen: |
| 39 | + ignore-decls: |
| 40 | + - T any |
| 41 | + - i int |
| 42 | + - t *testing.T |
| 43 | + - tb testing.TB |
| 44 | + - wg sync.WaitGroup |
| 45 | + exclusions: |
| 46 | + generated: lax |
| 47 | + presets: |
| 48 | + - comments |
| 49 | + - common-false-positives |
| 50 | + - legacy |
| 51 | + - std-error-handling |
| 52 | + rules: |
| 53 | + - linters: |
| 54 | + - err113 |
| 55 | + path: (.+)\.go$ |
| 56 | + text: do not define dynamic errors.* |
| 57 | +formatters: |
| 58 | + enable: |
| 59 | + - gci |
| 60 | + - gofmt |
| 61 | + exclusions: |
| 62 | + generated: lax |
0 commit comments