|
1 | 1 | --- |
| 2 | +version: "2" |
2 | 3 | run: |
3 | | - # Tell golangci-lint to not acquire a lock because |
4 | | - # arcanist will run multiple instances in parallel. |
5 | 4 | allow-parallel-runners: true |
6 | | - # arcanist runs many of these in parallel causing |
7 | | - # CPU contention and longer runtimes. |
8 | | - timeout: 3m |
9 | | - |
10 | | -output: |
11 | | - sort-results: true |
12 | | - |
13 | | -issues: |
14 | | - max-issues-per-linter: 0 |
15 | | - max-same-issues: 0 |
16 | | - # TODO(ddelnano): Remove once typecheck is upgraded in next golangci-lint upgrade |
17 | | - # This error originates from the stdlib due to generics usage |
18 | | - exclude-rules: |
19 | | - - path: .*slices\/sort.go |
20 | | - linters: |
21 | | - - typecheck |
22 | | - text: "^(undefined: (min|max))" |
23 | | - |
24 | 5 | linters: |
25 | 6 | enable: |
26 | 7 | - asciicheck |
27 | | - - errcheck |
28 | | - # Although goimports includes gofmt, it doesn't support the simplify option. |
29 | | - # So we include gofmt here. |
30 | | - - gofmt |
31 | | - - gosimple |
32 | | - - govet |
33 | | - - ineffassign |
34 | 8 | - makezero |
35 | 9 | - misspell |
36 | 10 | - nakedret |
37 | 11 | - nolintlint |
38 | 12 | - nonamedreturns |
39 | 13 | - predeclared |
40 | 14 | - revive |
41 | | - - staticcheck |
42 | | - # https://github.com/golangci/golangci-lint/issues/2649 |
43 | | - # - structcheck |
44 | | - - typecheck |
45 | | - - unused |
46 | | - # https://github.com/golangci/golangci-lint/issues/2649 |
47 | | - # - wastedassign |
48 | 15 | - whitespace |
49 | | - disable: |
50 | | - # The following linters are run separately by arcanist at the moment. |
51 | | - # This is because we have autofix hooks for these linters. |
52 | | - - goimports |
53 | | - disable-all: false |
54 | | - |
55 | | -linters-settings: |
56 | | - errcheck: |
57 | | - # yamllint disable-line rule:line-length |
58 | | - ignore: io:Close,github.com/fatih/color,github.com/spf13/pflag:MarkHidden,github.com/spf13/viper:(BindEnv|BindPFlag),github.com/spf13/cobra:(Help|MarkFlagRequired|Usage),github.com/segmentio/analytics-go/v3:Enqueue,database/sql:Rollback,github.com/nats-io/nats.go:Unsubscribe |
59 | | - goimports: |
60 | | - local-prefixes: px.dev |
61 | | - nakedret: |
62 | | - max-func-lines: 0 |
| 16 | + settings: |
| 17 | + errcheck: |
| 18 | + exclude-functions: |
| 19 | + - io.Close |
| 20 | + - github.com/spf13/pflag.MarkHidden |
| 21 | + - github.com/spf13/viper.BindEnv |
| 22 | + - github.com/spf13/viper.BindPFlag |
| 23 | + - github.com/spf13/cobra.Help |
| 24 | + - github.com/spf13/cobra.MarkFlagRequired |
| 25 | + - github.com/spf13/cobra.Usage |
| 26 | + - (github.com/segmentio/analytics-go/v3.Client).Enqueue |
| 27 | + - database/sql.Rollback |
| 28 | + - github.com/nats-io/nats.go.Unsubscribe |
| 29 | + staticcheck: |
| 30 | + checks: |
| 31 | + - all |
| 32 | + - "-ST1005" # ignore the "ST1005: error strings should not be capitalized" check |
| 33 | + exclusions: |
| 34 | + generated: lax |
| 35 | + presets: |
| 36 | + - comments |
| 37 | + - common-false-positives |
| 38 | + - legacy |
| 39 | + - std-error-handling |
| 40 | + paths: |
| 41 | + - third_party$ |
| 42 | + - builtin$ |
| 43 | + - examples$ |
| 44 | +issues: |
| 45 | + max-issues-per-linter: 0 |
| 46 | + max-same-issues: 0 |
| 47 | +formatters: |
| 48 | + enable: |
| 49 | + - gofmt |
| 50 | + settings: |
| 51 | + goimports: |
| 52 | + local-prefixes: |
| 53 | + - px.dev |
| 54 | + exclusions: |
| 55 | + generated: lax |
| 56 | + paths: |
| 57 | + - third_party$ |
| 58 | + - builtin$ |
| 59 | + - examples$ |
0 commit comments