-
Notifications
You must be signed in to change notification settings - Fork 36
/
.golangci.yml
69 lines (68 loc) · 1.49 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
# TODO(Landau): Turn on all linters
# TODO(Landau): move this to top level of opensource?
run:
go: "1.21"
linters:
disable-all: true
enable:
- dupl
- errorlint
- errcheck
- gofmt
- goimports
- gosimple
- govet
- importas
- ineffassign
- misspell
- nilerr
- reassign
- revive
- staticcheck
- stylecheck
- tenv
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- varnamelen
# If we're going to use github.com/pkg/errors we should probably turn this on?
# Let's adopt new stackerr lib and we can turn this on.
# - wrapcheck
- unused
linters-settings:
errorlint:
errorf: false
revive:
rules: # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
- name: atomic
- name: bare-return
- name: bool-literal-in-expr
- name: cognitive-complexity
arguments:
- 27
- name: datarace
- name: duplicated-imports
- name: early-return
- name: error-return
- name: error-strings
- name: if-return
- name: indent-error-flow
- name: range-val-address
- name: receiver-naming
- name: time-naming
- name: var-naming
- name: unreachable-code
varnamelen:
max-distance: 10
ignore-decls:
- id []byte
- r *http.Request
- r io.Reader
- t testing.T
- w http.ResponseWriter
- w io.Writer
# TODO: enable this
# unparam:
# check-exported: true