forked from ava-labs/coreth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
77 lines (73 loc) · 2.27 KB
/
.golangci.yml
File metadata and controls
77 lines (73 loc) · 2.27 KB
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
version: "2"
run:
tests: true
linters:
default: none
enable:
- bidichk
- copyloopvar
- durationcheck
- gocheckcompilerdirectives
- govet
- ineffassign
- mirror
- misspell
- reassign
# - revive # only certain checks enabled
- staticcheck
- unconvert
- unused
- whitespace
settings:
goconst:
min-len: 3 # minimum length of string constant
min-occurrences: 6 # minimum number of occurrences
staticcheck:
checks:
- all
# There's a lot of legacy code that triggers these warnings after upgrading golangci-lint.
# These checks are removed.
- -QF1001 # Apply De Morgan’s law
- -QF1002 # Convert an untagged switch comparing the same variable into a “tagged” switch
- -QF1003 # Convert if / else-if chains comparing the same variable into a tagged switch
- -QF1006 # Lift if + break into loop condition
- -QF1008 # Omit embedded fields from selector expression
- -QF1010 # Convert slice of bytes to string when printing it
- -SA1019 # Use of deprecated identifiers: triggers when you import or use something marked deprecated.
- -SA4009 # A function argument is overwritten before its first use.
- -SA9003 # Empty body in an if or else branch.
- -ST1003 # Poorly chosen identifier.
- -ST1008 # A function’s error value should be its last return value.
- -ST1016 # Use consistent method receiver names (e.g. avoid mixing `s *S`, `s S`, `t *T` in same type).
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- unused
# Exclude unused geth symbols from ethclient/ethclient.go to simplify upgrading Geth to a newer version.
path: ethclient\/ethclient\.go
text: (type `rpcProgress`|func `\(\*rpcProgress\)\.toSyncProgress`) is unused
- linters:
- goconst
path: (.+)_test\.go
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- goimports
settings:
gofmt:
simplify: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$