|
| 1 | +version: "2" |
1 | 2 | run: |
2 | 3 | concurrency: 3 |
3 | 4 | timeout: 5m |
4 | 5 | issues-exit-code: 1 |
5 | 6 | tests: true |
6 | 7 |
|
7 | | -# all available settings of specific linters |
8 | | -linters-settings: |
9 | | - goheader: |
10 | | - template: |- |
11 | | - Copyright The OpenTelemetry Authors |
12 | | - SPDX-License-Identifier: Apache-2.0 |
13 | | - goimports: |
14 | | - local-prefixes: github.com/open-telemetry/opentelemetry-operator |
15 | | - gci: |
16 | | - sections: |
17 | | - - standard |
18 | | - - default |
19 | | - - prefix(github.com/open-telemetry/opentelemetry-operator) |
20 | | - misspell: |
21 | | - locale: US |
22 | | - ignore-words: |
23 | | - - cancelled |
24 | | - - metre |
25 | | - - meter |
26 | | - - metres |
27 | | - - kilometre |
28 | | - - kilometres |
29 | | - govet: |
30 | | - # settings per analyzer |
31 | | - settings: |
32 | | - printf: # analyzer name, run `go tool vet help` to see all analyzers |
33 | | - funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer |
34 | | - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof |
35 | | - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf |
36 | | - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf |
37 | | - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf |
38 | | - |
39 | | - enable-all: true |
40 | | - # TODO: Enable this and fix the alignment issues. |
41 | | - disable: |
42 | | - - fieldalignment |
43 | | - gofmt: |
44 | | - simplify: true |
45 | | - revive: |
46 | | - confidence: 0.8 |
47 | | - |
48 | | - depguard: |
49 | | - rules: |
50 | | - main: |
51 | | - deny: |
52 | | - - pkg: sync/atomic |
53 | | - desc: "Use go.uber.org/atomic instead of sync/atomic" |
54 | | - - pkg: github.com/pkg/errors |
55 | | - desc: "Use 'errors' or 'fmt' instead of github.com/pkg/errors" |
56 | | - |
57 | | -issues: |
58 | | - exclude-rules: |
59 | | - - linters: |
60 | | - - gci |
61 | | - source: "// \\+kubebuilder" |
62 | | - |
63 | 8 | linters: |
| 9 | + # all available settings of specific linters |
| 10 | + settings: |
| 11 | + depguard: |
| 12 | + rules: |
| 13 | + main: |
| 14 | + deny: |
| 15 | + - pkg: sync/atomic |
| 16 | + desc: Use go.uber.org/atomic instead of sync/atomic |
| 17 | + - pkg: github.com/pkg/errors |
| 18 | + desc: Use 'errors' or 'fmt' instead of github.com/pkg/errors |
| 19 | + goheader: |
| 20 | + template: |- |
| 21 | + Copyright The OpenTelemetry Authors |
| 22 | + SPDX-License-Identifier: Apache-2.0 |
| 23 | + govet: |
| 24 | + # TODO: Enable this and fix the alignment issues. |
| 25 | + disable: |
| 26 | + - fieldalignment |
| 27 | + enable-all: true |
| 28 | + # settings per analyzer |
| 29 | + settings: |
| 30 | + printf: # analyzer name, run `go tool vet help` to see all analyzers |
| 31 | + funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer |
| 32 | + - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Infof |
| 33 | + - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Warnf |
| 34 | + - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Errorf |
| 35 | + - (github.com/golangci/golangci-lint/v2/pkg/logutils.Log).Fatalf |
| 36 | + misspell: |
| 37 | + locale: US |
| 38 | + ignore-rules: |
| 39 | + - cancelled |
| 40 | + revive: |
| 41 | + confidence: 0.8 |
| 42 | + staticcheck: |
| 43 | + checks: |
| 44 | + - all |
| 45 | + - -QF1001 # FIXME Apply De Morgan’s law |
| 46 | + - -QF1003 # FIXME Convert if/else-if chain to tagged switch |
| 47 | + - -QF1004 # FIXME Use strings.ReplaceAll instead of strings.Replace with n == -1 |
| 48 | + - -QF1008 # FIXME Omit embedded fields from selector expression |
| 49 | + - -QF1011 # FIXME Omit redundant type from variable declaration |
| 50 | + - -ST1003 # FIXME Poorly chosen identifier |
| 51 | + - -ST1005 # FIXME Incorrectly formatted error string |
| 52 | + - -ST1012 # FIXME Poorly chosen name for error variable |
| 53 | + - -ST1016 # FIXME Use consistent method receiver names |
| 54 | + - -ST1019 # FIXME Importing the same package multiple times |
| 55 | + - -ST1023 # FIXME Redundant type in variable declaration |
64 | 56 | enable: |
| 57 | + - depguard |
| 58 | + - errcheck |
| 59 | + - errorlint |
| 60 | + - exhaustive |
| 61 | + - godot |
65 | 62 | - goheader |
66 | | - - goimports |
67 | | - - misspell |
68 | 63 | - gosec |
69 | 64 | - govet |
70 | | - - exhaustive |
71 | | - - godot |
72 | | - - unparam |
73 | | - - gosimple |
74 | | - - unused |
75 | | - - staticcheck |
76 | 65 | - ineffassign |
77 | | - - typecheck |
| 66 | + - misspell |
| 67 | + - staticcheck |
78 | 68 | - unparam |
79 | | - - depguard |
80 | | - - errcheck |
81 | | - - errorlint |
| 69 | + - unused |
| 70 | + exclusions: |
| 71 | + generated: lax |
| 72 | + presets: |
| 73 | + - comments |
| 74 | + - common-false-positives |
| 75 | + - legacy |
| 76 | + - std-error-handling |
| 77 | +formatters: |
| 78 | + enable: |
82 | 79 | - gci |
| 80 | + - gofmt |
| 81 | + settings: |
| 82 | + gci: |
| 83 | + sections: |
| 84 | + - standard |
| 85 | + - default |
| 86 | + - prefix(github.com/open-telemetry/opentelemetry-operator) |
| 87 | + gofmt: |
| 88 | + simplify: true |
| 89 | + exclusions: |
| 90 | + generated: lax |
0 commit comments