-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
105 lines (105 loc) · 2.36 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
run:
timeout: 5m
linters:
enable:
- asciicheck
- bidichk
- containedctx
- contextcheck
- copyloopvar
- decorder
- dogsled
- dupword
- durationcheck
- errchkjson
- errname
- errorlint
- exhaustive
- fatcontext
- forbidigo
- goconst
- gofmt
- goimports
- gosec
- intrange
- makezero
- loggercheck
- makezero
- misspell
- mnd
- nilerr
- nilnil
- nlreturn
- nolintlint
- paralleltest
- prealloc
- reassign
- revive
- testifylint
- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
- wastedassign
- whitespace
linters-settings:
goconst:
min-len: 5
goimports:
local-prefixes: github.com/smartcontractkit/mcms
govet:
enable:
- shadow
nlreturn:
block-size: 2
revive:
confidence: 1.0
rules:
- name: comment-spacings
- name: constant-logical-expr
- name: context-as-argument
- name: context-keys-type
- name: defer
- name: dot-imports
- name: early-return
- name: empty-block
- name: error-return
- name: error-strings
- name: error-naming
- name: errorf
- name: identical-branches
- name: if-return
- name: import-shadowing
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: redundant-import-alias
- name: string-of-int
- name: superfluous-else
- name: time-equal
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: use-any
- name: useless-break
- name: var-naming
- name: var-declaration
issues:
exclude-dirs:
# Exclude the directory from linting because it will soon be removed and only contains
# generated code. Can be removed once the gethwrappers directory is removed.
- sdk/evm/bindings
- sdk/usbwallet
exclude-rules:
- path: _test\.go
linters:
- unparam # No need to check for unused parameters in tests, since there are often false positives
- path: ^e2e/
linters:
- mnd # Exclude magic numbers rule in the e2e folder
- gosec # Exclude integer overflow (G115)
- paralleltest # Exclude requiring parallel tests