-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
105 lines (105 loc) · 3.05 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
linters-settings:
errcheck:
check-type-assertions: true
forbidigo:
forbid:
- '^fmt\.Print'
- '^log\.'
- '^print$'
- '^println$'
- '^panic$'
godox:
# TODO, OPT, etc. comments are fine to commit. Use FIXME comments for
# temporary hacks, and use godox to prevent committing them.
keywords: [FIXME]
varnamelen:
ignore-decls:
- T any
- i int
- wg sync.WaitGroup
- id string
linters:
enable-all: true
disable:
- cyclop # covered by gocyclo
- depguard # unnecessary for small libraries
- err113 # way too noisy
- exhaustruct # many exceptions
- funlen # rely on code review to limit function length
- gochecknoglobals # many exceptions
- gocognit # dubious "cognitive overhead" quantification
- gofumpt # prefer standard gofmt
- goimports # rely on gci instead
- gomnd # some unnamed constants are okay
- inamedparam # not standard style
- interfacebloat # many exceptions
- ireturn # "accept interfaces, return structs" isn't ironclad
- lll # don't want hard limits for line length
- maintidx # covered by gocyclo
- nilnil # allow this
- nlreturn # generous whitespace violates house style
- testifylint # does not want us to use assert
- testpackage # internal tests are fine
- thelper # we want to print out the whole stack
- wrapcheck # don't _always_ need to wrap errors
- wsl # generous whitespace violates house style
issues:
exclude-dirs-use-default: false
exclude-rules:
- linters:
- revive
path: check/client.go
test: "CheckCallOption"
- linters:
- revive
path: check/check_service_handler.go
test: "CheckServiceHandlerOption"
- linters:
- exhaustive
path: option/options.go
text: "reflect.Pointer|reflect.Ptr"
- linters:
- gocritic
path: check/file.go
text: "commentFormatting"
- linters:
- gocritic
path: check/location.go
text: "commentFormatting"
- linters:
- unparam
path: check/category_spec.go
- linters:
- unparam
path: check/annotation.go
- linters:
- unparam
path: check/response.go
- linters:
- unparam
path: info/plugin_info.go
- linters:
- varnamelen
path: check/internal/example
- linters:
- dupl
path: check/checkutil/breaking.go
- linters:
- varnamelen
path: check/checkutil/breaking.go
- linters:
- varnamelen
path: check/checkutil/lint.go
- linters:
- varnamelen
path: check/checkutil/util.go
- linters:
- varnamelen
path: internal/pkg/xslices/xslices.go
- linters:
- revive
path: internal/pkg/compare/compare.go
- linters:
- gosec
path: check/checktest/checktest.go
text: "G115:"