1+ version : " 2"
2+ linters :
3+ enable :
4+ # - containedctx
5+ # - contextcheck
6+ # - depguard
7+ # - dupl
8+ # - errname
9+ - errorlint
10+ # - fatcontext
11+ # - forcetypeassert
12+ - ginkgolinter
13+ # - gocognit
14+ # - goconst
15+ # - gocritic
16+ # - godot
17+ # - gosec
18+ # - intrange
19+ # - ireturn
20+ # - lll
21+ # - maintidx
22+ - mirror
23+ - misspell
24+ - nilerr
25+ - nilnesserr
26+ - nolintlint
27+ # - paralleltest
28+ # - prealloc
29+ # - promlinter
30+ # - revive
31+ # - rowserrcheck
32+ # - sqlclosecheck
33+ # - testifylint
34+ - thelper
35+ - unconvert
36+ # - unparam
37+ - usetesting
38+ - wastedassign
39+ - whitespace
40+ - govet
41+ # - staticcheck
42+ - canonicalheader
43+ # - copyloopvar
44+ - dupword
45+ # - err113
46+ - exptostd
47+ - goheader
48+ - importas
49+ # - intrange
50+ - nakedret
51+ - sloglint
52+ - usestdlibvars
53+ # wrapcheck is not working as expected. It is categorizing internal packages as external.
54+ # - wrapcheck
55+ settings :
56+ depguard :
57+ rules :
58+ main :
59+ deny :
60+ - pkg : github.com/pkg/errors
61+ desc : github.com/pkg/errors is no longer maintained
62+ errcheck :
63+ # Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
64+ # Such cases aren't reported by default.
65+ # Default: false
66+ check-type-assertions : false
67+ errorlint :
68+ # Check whether fmt.Errorf uses the %w verb for formatting errors.
69+ # See the https://github.com/polyfloyd/go-errorlint for caveats.
70+ # Default: true
71+ errorf : true
72+ # Check for plain type assertions and type switches.
73+ # Default: true
74+ asserts : false
75+ # Check for plain error comparisons.
76+ # Default: true
77+ comparison : true
78+ fatcontext :
79+ check-struct-pointers : true
80+ gocognit :
81+ min-complexity : 15
82+ gosec :
83+ excludes :
84+ - G204
85+ - G404
86+ - G306
87+ govet :
88+ disable :
89+ - fieldalignment
90+ # Enable all analyzers.
91+ # Default: false
92+ enable-all : false
93+ iface :
94+ enable :
95+ - identical # Identifies interfaces in the same package that have identical method sets.
96+ - unused # Identifies interfaces that are not used anywhere in the same package where the interface is defined.
97+ - opaque # Identifies functions that return interfaces, but the actual returned value is always a single concrete implementation.
98+ ireturn :
99+ # By default, it allows using errors, empty interfaces, anonymous interfaces,
100+ # and interfaces provided by the standard library.
101+ allow :
102+ - error
103+ - empty
104+ - anon
105+ - stdlib
106+ - generic
107+ - (or|er)$
108+ - T
109+ - github.com/prometheus/client_golang/prometheus.Counter
110+ - github.com/prometheus/client_golang/prometheus.Gauge
111+ - github.com/prometheus/client_golang/prometheus.Histogram
112+ lll :
113+ # Max line length, lines longer will be reported.
114+ # '\t' is counted as 1 character by default, and can be changed with the tab-width option.
115+ # Default: 120.
116+ line-length : 240
117+ maintidx :
118+ under : 20
119+ nolintlint :
120+ require-specific : true
121+ revive :
122+ enable-all-rules : true
123+ rules :
124+ - name : argument-limit
125+ arguments :
126+ - 5
127+ - name : line-length-limit
128+ arguments :
129+ - 240
130+ - name : file-header
131+ disabled : true
132+ - name : package-comments
133+ disabled : true
134+ - name : max-public-structs
135+ disabled : true
136+ - name : banned-characters
137+ disabled : true
138+ - name : cognitive-complexity
139+ disabled : true
140+ - name : cyclomatic
141+ disabled : true
142+ - name : function-length
143+ disabled : true
144+ - name : function-result-limit
145+ arguments :
146+ - 3
147+ - name : add-constant
148+ disabled : true
149+ - name : unhandled-error
150+ arguments :
151+ - fmt.Printf
152+ - fmt.Println
153+ - name : confusing-naming
154+ disabled : true
155+ - name : comment-spacings
156+ arguments :
157+ - ' nolint:'
158+ rowserrcheck :
159+ packages :
160+ - github.com/jackc/pgx/v5
161+ - github.com/jackc/pgx/v4
162+ wrapcheck :
163+ # An array of strings specifying additional substrings of signatures to ignore.
164+ # Unlike 'ignoreSigs', this option extends the default set (or the set specified in 'ignoreSigs') without replacing it entirely.
165+ # This allows you to add specific signatures to the ignore list
166+ # while retaining the defaults or any items in 'ignoreSigs'.
167+ # Default: []
168+ extra-ignore-sigs :
169+ - .CustomError(
170+ - .SpecificWrap(
171+
172+ # An array of strings that specify substrings of signatures to ignore.
173+ # If this set, it will override the default set of ignored signatures.
174+ # See https://github.com/tomarrell/wrapcheck#configuration for more information.
175+ # Default: [".Errorf(", "errors.New(", "errors.Unwrap(", "errors.Join(", ".Wrap(", ".Wrapf(", ".WithMessage(", ".WithMessagef(", ".WithStack("]
176+ ignore-sigs :
177+ - errors.New(
178+ - errors.Newf(
179+ - errors.Unwrap(
180+ - errors.Join(
181+ - .Wrap(
182+ - .Wrapf(
183+ - status.Error(
184+ - .Wait() # The error reported by errorgroup.Wait() (external) actually
185+ # originates from the internal code.
186+ # An array of strings that specify regular expressions of signatures to ignore.
187+ # Default: []
188+ ignore-sig-regexps :
189+ - \.New.*Error\(
190+ # An array of strings that specify globs of packages to ignore.
191+ # Default: []
192+ ignore-package-globs :
193+ - github.ibm.com/decentralized-trust-research/scalable-committer/utils/grpcerror
194+ # An array of strings that specify regular expressions of interfaces to ignore.
195+ # Default: []
196+ # ignoreInterfaceRegexps:
197+ # - ^(?i)c(?-i)ach(ing|e)
198+ exclusions :
199+ # Mode of the generated files analysis.
200+ #
201+ # - `strict`: sources are excluded by strictly following the Go generated file convention.
202+ # Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`
203+ # This line must appear before the first non-comment, non-blank text in the file.
204+ # https://go.dev/s/generatedcode
205+ # - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.
206+ # - `disable`: disable the generated files exclusion.
207+ #
208+ # Default: lax
209+ generated : lax
210+ # Log a warning if an exclusion rule is unused.
211+ # Default: false
212+ warn-unused : true
213+ # Predefined exclusion rules.
214+ # Default: []
215+ presets :
216+ - common-false-positives
217+ # formatters:
218+ # enable:
219+ # - gofumpt
220+ # - goimports
221+ # settings:
222+ # gofumpt:
223+ # extra-rules: true
224+ # goimports:
225+ # # A comma-separated list of prefixes, which, if set, checks import paths
226+ # # with the given prefixes are grouped after 3rd-party packages.
227+ # # Default: ""
228+ # local-prefixes:
229+ # - github.ibm.com/decentralized-trust-research/idap
230+ # exclusions:
231+ # generated: lax
0 commit comments