-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.golangci.yml
83 lines (75 loc) · 2.18 KB
/
.golangci.yml
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
82
83
run:
go: '1.22'
timeout: 10m
linters:
enable-all: true
disable:
# Linters that check comments for correctness; disallow fixme, todo, etc., missing punctuation, etc.
- godox
- godot
- stylecheck
- nolintlint
# Linters with dubious value
- depguard
- tagalign
- tagliatelle
- goerr113
- gci
- varnamelen
- wrapcheck
- lll
- interfacebloat # I don't mind interfaces with >10 methods
- ireturn # Perfectly fine to return an interface
- testpackage # Meh
- funlen # It is probably useful, but...
- goconst # It is probably useful, but...
# These linters find structures with uninitialized fields, which is useful under
# certain conditions, but shouldn't be generally enabled.
- exhaustivestruct
- exhaustruct
- exhaustive
# DEPRECATED LINTERS: do not re-enable
# These linters have been abandoned by their authors and are no longer maintained, and
# most have been replaced by newer linters.
- deadcode
- golint
- ifshort
- interfacer
- maligned
- nosnakecase
- scopelint
- structcheck
- varcheck
issues:
# Show only new issues created after git revision
# A long-term goal should be to fix all existing issues, and then remove this
new-from-rev: HEAD
exclude-use-default: false
exclude-rules:
- path: (.+)_test.go
# NOTE: We should be very careful about excluding linters for test files, as tests are
# also code and should be held to the same standards as the rest of the code.
# Only exclude linters that are known to be problematic for test files, or don't
# add value.
linters:
- dogsled
- funlen
- gochecknoglobals # We use globals quite a bit in tests
- goconst # We also repeat ourselves a bit
exclude:
# should have a package comment, unless it's in another file for this package (golint)
- 'in another file for this package'
linters-settings:
dupl:
threshold: 400
lll:
line-length: 170
gocyclo:
min-complexity: 15
revive:
ignore-generated-header: true
rules:
- name: package-comments
disabled: true
output:
format: colored-line-number