Debian Codegraph @

.golangci.yml

raw symbols SCIP
1 formatters:
2 enable:
3 - gci
4 - gofumpt
5 settings:
6 gci:
7 sections:
8 - standard
9 - default
10 - prefix(github.com/prometheus/otlptranslator)
11 gofumpt:
12 extra-rules: true
13 issues:
14 max-issues-per-linter: 0
15 max-same-issues: 0
16 linters:
17 # Keep this list sorted alphabetically
18 enable:
19 - depguard
20 - errorlint
21 - exptostd
22 - gocritic
23 - godot
24 - loggercheck
25 - misspell
26 - nilnesserr
27 # TODO: Enable once https://github.com/golangci/golangci-lint/issues/3228 is fixed.
28 # - nolintlint
29 - perfsprint
30 - predeclared
31 - revive
32 - sloglint
33 - testifylint
34 - unconvert
35 - unused
36 - usestdlibvars
37 - whitespace
38 settings:
39 depguard:
40 rules:
41 main:
42 deny:
43 - pkg: sync/atomic
44 desc: Use go.uber.org/atomic instead of sync/atomic
45 - pkg: github.com/stretchr/testify/assert
46 desc: Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert
47 - pkg: io/ioutil
48 desc: Use corresponding 'os' or 'io' functions instead.
49 - pkg: github.com/pkg/errors
50 desc: Use 'errors' or 'fmt' instead of github.com/pkg/errors
51 - pkg: golang.org/x/exp/slices
52 desc: Use 'slices' instead.
53 perfsprint:
54 # Optimizes `fmt.Errorf`.
55 errorf: true
56 revive:
57 # By default, revive will enable only the linting rules that are named in the configuration file.
58 # So, it's needed to explicitly enable all required rules here.
59 rules:
60 # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
61 - name: blank-imports
62 - name: comment-spacings
63 - name: context-as-argument
64 arguments:
65 # Allow functions with test or bench signatures.
66 - allowTypesBefore: '*testing.T,testing.TB'
67 - name: context-keys-type
68 - name: dot-imports
69 - name: early-return
70 arguments:
71 - preserveScope
72 # A lot of false positives: incorrectly identifies channel draining as "empty code block".
73 # See https://github.com/mgechev/revive/issues/386
74 - name: empty-block
75 disabled: true
76 - name: error-naming
77 - name: error-return
78 - name: error-strings
79 - name: errorf
80 - name: exported
81 - name: increment-decrement
82 - name: indent-error-flow
83 arguments:
84 - preserveScope
85 - name: range
86 - name: receiver-naming
87 - name: redefines-builtin-id
88 - name: superfluous-else
89 arguments:
90 - preserveScope
91 - name: time-naming
92 - name: unexported-return
93 - name: unreachable-code
94 - name: unused-parameter
95 - name: var-declaration
96 - name: var-naming
97 testifylint:
98 disable:
99 - float-compare
100 - go-require
101 enable-all: true
102 run:
103 timeout: 15m
104 version: "2"