-
Notifications
You must be signed in to change notification settings - Fork 35
/
.golangci.yaml
81 lines (74 loc) · 1.7 KB
/
.golangci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
run:
timeout: 2m
linters-settings:
gosec:
excludes:
- G601 ## Implicit memory aliasing of items from a range statement - not possible in go 1.22.
cyclop:
max-complexity: 15
nestif:
min-complexity: 10
govet:
settings:
shadow:
strict: true
enable-all: true
nolintlint:
require-explanation: true
godot:
scope: all
nakedret:
max-func-lines: 0
linters:
enable-all: true
disable:
# Spammy / low value
- nonamedreturns
- varnamelen
- exhaustruct
- nlreturn
- wsl
- lll
- paralleltest
# Duplicate functionality.
- funlen
- gocognit
# Deprecated.
- execinquery
- gomnd
# Good but gets in the way too often.
- testpackage
# Unknown details about how Artemis works are flagged with TODO's.
- godox
# Seems to be broken.
- depguard
# Makes it messy for multiple optional tags.
- tagalign
# Not needed for go 1.22+.
- exportloopref
- errchkjson # Duplicate functionality for errcheck.
issues:
include:
- EXC0012
- EXC0014
exclude-rules:
# Exclude linters which aren't an issue in tests.
- path: _test\.go
linters:
- gochecknoglobals
- wrapcheck
# File mode permissions are fine for constants.
- text: "Magic number: 0o\\d+"
linters:
- mnd
# Field alignment in tests isn't a performance issue.
- text: fieldalignment
path: _test\.go
# Dynamic errors can provide useful context.
- text: "do not define dynamic errors, use wrapped static errors instead:"
linters:
- err113
# Interface casting is fine in mock.
- path: mock_test\.go
linters:
- forcetypeassert