|
1 | | -output: |
2 | | - # Make output more digestible with quickfix in vim/emacs/etc. |
3 | | - sort-results: true |
4 | | - print-issued-lines: false |
| 1 | +version: "2" |
| 2 | + |
| 3 | +# Print all issues reported by all linters. |
| 4 | +issues: |
| 5 | + max-issues-per-linter: 0 |
| 6 | + max-same-issues: 0 |
5 | 7 |
|
6 | 8 | linters: |
7 | 9 | # We'll track the golangci-lint default linters manually |
8 | 10 | # instead of letting them change without our control. |
9 | | - disable-all: true |
| 11 | + default: none |
10 | 12 | enable: |
11 | 13 | # golangci-lint defaults: |
12 | 14 | - errcheck |
13 | | - - gosimple |
14 | 15 | - govet |
15 | 16 | - ineffassign |
16 | 17 | - staticcheck |
17 | 18 | - unused |
18 | 19 |
|
19 | 20 | # Our own extras: |
20 | | - - gofumpt |
21 | | - - nolintlint # lints nolint directives |
22 | 21 | - revive |
23 | | - |
24 | | -linters-settings: |
25 | | - govet: |
26 | | - # These govet checks are disabled by default, but they're useful. |
27 | | - enable: |
28 | | - - niliness |
29 | | - - reflectvaluecompare |
30 | | - - sortslice |
31 | | - - unusedwrite |
32 | | - |
33 | | - errcheck: |
34 | | - exclude-functions: |
35 | | - # Writing a plain string to a fmt.State cannot fail. |
36 | | - - io.WriteString(fmt.State) |
37 | | - - fmt.Fprintf(fmt.State) |
38 | | - |
39 | | -issues: |
40 | | - # Print all issues reported by all linters. |
41 | | - max-issues-per-linter: 0 |
42 | | - max-same-issues: 0 |
43 | | - |
44 | | - # Don't ignore some of the issues that golangci-lint considers okay. |
45 | | - # This includes documenting all exported entities. |
46 | | - exclude-use-default: false |
47 | | - |
48 | | - exclude-rules: |
49 | | - # Don't warn on unused parameters. |
50 | | - # Parameter names are useful; replacing them with '_' is undesirable. |
51 | | - - linters: [revive] |
52 | | - text: 'unused-parameter: parameter \S+ seems to be unused, consider removing or renaming it as _' |
53 | | - |
54 | | - # staticcheck already has smarter checks for empty blocks. |
55 | | - # revive's empty-block linter has false positives. |
56 | | - # For example, as of writing this, the following is not allowed. |
57 | | - # for foo() { } |
58 | | - - linters: [revive] |
59 | | - text: 'empty-block: this block is empty, you can remove it' |
| 22 | + - nolintlint |
| 23 | + |
| 24 | + settings: |
| 25 | + |
| 26 | + errcheck: |
| 27 | + exclude-functions: |
| 28 | + # Writing a plain string to a fmt.State cannot fail. |
| 29 | + - io.WriteString(fmt.State) |
| 30 | + - fmt.Fprintf(fmt.State) |
| 31 | + |
| 32 | + govet: |
| 33 | + # These govet checks are disabled by default, but they're useful. |
| 34 | + enable: |
| 35 | + - nilness |
| 36 | + - reflectvaluecompare |
| 37 | + - sortslice |
| 38 | + - unusedwrite |
| 39 | + |
| 40 | + exclusions: |
| 41 | + generated: lax |
| 42 | + rules: |
| 43 | + # Don't warn on unused parameters. |
| 44 | + # Parameter names are useful; replacing them with '_' is undesirable. |
| 45 | + - linters: [revive] |
| 46 | + text: 'unused-parameter: parameter \S+ seems to be unused, consider removing or renaming it as _' |
| 47 | + |
| 48 | + # staticcheck already has smarter checks for empty blocks. |
| 49 | + # revive's empty-block linter has false positives. |
| 50 | + # For example, as of writing this, the following is not allowed. |
| 51 | + # for foo() { } |
| 52 | + - linters: [revive] |
| 53 | + text: 'empty-block: this block is empty, you can remove it' |
| 54 | + |
| 55 | +formatters: |
| 56 | + enable: |
| 57 | + - gofumpt |
| 58 | + exclusions: |
| 59 | + generated: lax |
0 commit comments