|
1 | | -# The sections in this file are ordered in the order presented in |
2 | | -# https://golangci-lint.run/usage/configuration/. |
3 | | -# The nested fields are ordered alphabetically. |
| 1 | +# This file is generated by migrating the older v1 config |
| 2 | +# file to v2 using `golangci-lint migrate` command. |
| 3 | +# Details about the migration: https://golangci-lint.run/docs/product/migration-guide/ |
| 4 | +# The configuration `run.timeout` is ignored. By default, in v2, the timeout is disabled. |
4 | 5 |
|
5 | | -linters-settings: |
6 | | - goheader: |
7 | | - template-path: copyright_header |
8 | | - goimports: |
9 | | - local-prefixes: github.com/runfinch/finch-daemon |
10 | | - gosec: |
11 | | - config: |
12 | | - G306: "0o644" |
13 | | - excludes: |
14 | | - - G304 |
15 | | - - G101 |
16 | | - - G104 |
17 | | - - G115 # added to prevent false uint conversion errors |
18 | | - lll: |
19 | | - line-length: 250 |
20 | | - tab-width: 4 |
21 | | - makezero: |
22 | | - always: true |
23 | | - nolintlint: |
24 | | - require-explanation: true |
25 | | - require-specific: true |
26 | | - stylecheck: |
27 | | - checks: ["all", "-ST1003", "-ST1000", "-ST1001", "-ST1021"] |
| 6 | +version: "2" |
28 | 7 | linters: |
29 | 8 | enable: |
30 | | - # - errname |
31 | | - # - errorlint |
32 | 9 | - copyloopvar |
33 | | - # - forcetypeassert |
34 | | - # - gocritic |
35 | 10 | - godot |
36 | | - # - gofumpt |
37 | 11 | - goheader |
38 | | - # - goimports |
39 | 12 | - gosec |
40 | 13 | - lll |
41 | | - # - makezero |
42 | 14 | - misspell |
43 | | - # - nilerr |
44 | | - # - nilnil |
45 | 15 | - nolintlint |
46 | 16 | - nosprintfhostport |
47 | | - # - paralleltest |
48 | 17 | - predeclared |
49 | 18 | - reassign |
50 | | - # - revive |
| 19 | + - staticcheck |
51 | 20 | - testableexamples |
52 | 21 | - unconvert |
53 | | - # - unparam |
54 | 22 | - usestdlibvars |
55 | 23 | - wastedassign |
56 | 24 | - whitespace |
57 | | - - stylecheck |
58 | 25 | disable: |
59 | 26 | - errcheck |
60 | | -issues: |
61 | | - exclude-rules: |
62 | | - - linters: |
63 | | - - lll |
64 | | - # A go:generate statement has to be in the same line: |
65 | | - # https://github.com/golang/go/issues/46050. |
66 | | - source: "^//go:generate " |
67 | | - # Some checks enabled in the stylecheck setting are disabled by default |
68 | | - # (e.g., https://golangci-lint.run/usage/false-positives/#exc0013), |
69 | | - # so we need to enable them explicitly here. |
70 | | - exclude-use-default: false |
71 | | - # fix: true |
72 | | -run: |
73 | | - timeout: 5m |
| 27 | + settings: |
| 28 | + goheader: |
| 29 | + template-path: copyright_header |
| 30 | + gosec: |
| 31 | + excludes: |
| 32 | + - G304 |
| 33 | + - G101 |
| 34 | + - G104 |
| 35 | + - G115 # added to prevent false uint conversion errors |
| 36 | + config: |
| 37 | + G306: "0o644" |
| 38 | + lll: |
| 39 | + line-length: 250 |
| 40 | + tab-width: 4 |
| 41 | + makezero: |
| 42 | + always: true |
| 43 | + nolintlint: |
| 44 | + require-explanation: true |
| 45 | + require-specific: true |
| 46 | + staticcheck: |
| 47 | + checks: |
| 48 | + - all |
| 49 | + - -ST1000 |
| 50 | + - -ST1001 |
| 51 | + - -ST1003 |
| 52 | + - -ST1021 |
| 53 | + exclusions: |
| 54 | + generated: lax |
| 55 | + rules: |
| 56 | + - linters: |
| 57 | + - lll |
| 58 | + # A go:generate statement has to be in the same line: |
| 59 | + # https://github.com/golang/go/issues/46050. |
| 60 | + source: '^//go:generate ' |
| 61 | + paths: |
| 62 | + - third_party$ |
| 63 | + - builtin$ |
| 64 | + - examples$ |
| 65 | +formatters: |
| 66 | + settings: |
| 67 | + goimports: |
| 68 | + local-prefixes: |
| 69 | + - github.com/runfinch/finch-daemon |
| 70 | + exclusions: |
| 71 | + generated: lax |
| 72 | + paths: |
| 73 | + - third_party$ |
| 74 | + - builtin$ |
| 75 | + - examples$ |
0 commit comments