forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yml
128 lines (123 loc) · 3.02 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# This file configures github.com/golangci/golangci-lint.
run:
timeout: 20m
tests: true
linters:
enable:
# Every available linter at the time of writing was considered (quickly) and
# inclusion was liberal. Linters are good at detecting code smells, but if
# we find that a particular one causes too many false positives then we can
# configure it better or, as a last resort, remove it.
- containedctx
- errcheck
- forcetypeassert
- gci
- gocheckcompilerdirectives
- gofmt
# goheader is disabled but it is enabled in the CI with a flag.
# Please see .github/workflows/golangci-lint.yml which explains why.
# - goheader
- goimports
- gomodguard
- gosec
- govet
- ineffassign
# TODO(arr4n): investigate ireturn
- misspell
- nakedret
- nestif
- nilerr
- nolintlint
- reassign
- revive
- sloglint
- staticcheck
- tagliatelle
- testableexamples
- testifylint
- thelper
- tparallel
- unconvert
- usestdlibvars
- unused
- whitespace
linters-settings:
gci:
custom-order: true
sections:
- standard
- default
- localmodule
# The rest of these break developer expections, in increasing order of
# divergence, so are at the end to increase the chance of being seen.
- alias
- dot
- blank
goheader:
template-path: .libevm-header
gomodguard:
blocked:
modules:
- github.com/ethereum/go-ethereum:
reason: "Original, forked repo"
- github.com/ava-labs/avalanchego:
reason: "Avoid dependency loop"
- github.com/ava-labs/coreth:
reason: "Avoid dependency loop"
- github.com/ava-labs/subnet-evm:
reason: "Avoid dependency loop"
revive:
rules:
- name: unused-parameter
# Method parameters may be required by interfaces and forcing them to be
# named _ is of questionable benefit.
disabled: true
issues:
exclude-dirs-use-default: false
exclude-rules:
- path-except: libevm
linters:
# If any issue is flagged in a non-libevm file, add the linter here
# because the problem isn't under our control.
- containedctx
- forcetypeassert
- errcheck
- gci
- gofmt
- goheader
- goimports
- gosec
- gosimple
- govet
- nakedret
- nestif
- nilerr
- nolintlint
- revive
- staticcheck
- tagliatelle
- testableexamples
- testifylint
- thelper
- tparallel
- typecheck
- usestdlibvars
- varnamelen
- wastedassign
- whitespace
include:
# Many of the default exclusions are because, verbatim "Annoying issue",
# which defeats the point of a linter.
- EXC0002
- EXC0004
- EXC0005
- EXC0006
- EXC0007
- EXC0008
- EXC0009
- EXC0010
- EXC0011
- EXC0012
- EXC0013
- EXC0014
- EXC0015