Skip to content

Commit 8913da1

Browse files
committed
disable mnd, accept more complexity
1 parent 60e3d60 commit 8913da1

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

.golangci.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ linters:
7777
- loggercheck # checks key value pairs for common logger libraries (kitlog,klog,logr,zap)
7878
- makezero # finds slice declarations with non-zero initial length
7979
- mirror # reports wrong mirror patterns of bytes/strings usage
80-
- mnd # detects magic numbers
80+
# - mnd # detects magic numbers
8181
- musttag # enforces field tags in (un)marshaled structs
8282
- nakedret # finds naked returns in functions greater than a specified function length
8383
- nestif # reports deeply nested if statements
@@ -160,7 +160,7 @@ linters:
160160
# The maximal average package complexity.
161161
# If it's higher than 0.0 (float) the check is enabled.
162162
# Default: 0.0
163-
package-average: 10.0
163+
package-average: 15.0
164164

165165
depguard:
166166
rules:
@@ -240,7 +240,7 @@ linters:
240240
gocognit:
241241
# Minimal code complexity to report.
242242
# Default: 30 (but we recommend 10-20)
243-
min-complexity: 49
243+
min-complexity: 54
244244

245245
gocritic:
246246
enable-all: true
@@ -277,26 +277,6 @@ linters:
277277
# Default: false
278278
skip-single-param: true
279279

280-
mnd:
281-
# List of function patterns to exclude from analysis.
282-
# Values always ignored: `time.Date`,
283-
# `strconv.FormatInt`, `strconv.FormatUint`, `strconv.FormatFloat`,
284-
# `strconv.ParseInt`, `strconv.ParseUint`, `strconv.ParseFloat`.
285-
# Default: []
286-
ignored-functions:
287-
- args.Error
288-
- flag.Arg
289-
- flag.Duration.*
290-
- flag.Float.*
291-
- flag.Int.*
292-
- flag.Uint.*
293-
- os.Chmod
294-
- os.Mkdir.*
295-
- os.OpenFile
296-
- os.WriteFile
297-
- prometheus.ExponentialBuckets.*
298-
- prometheus.LinearBuckets
299-
300280
nakedret:
301281
# Make an issue if func has more lines of code than this setting, and it has naked returns.
302282
# Default: 30

0 commit comments

Comments
 (0)