forked from synapsecns/sanguine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
129 lines (120 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
run:
tests: true
skip-dirs-use-default: false
skip-dirs:
- grpc/client/rest/*
- bundle/*
- generated/*
timeout: 15m
skip-files:
- '.*\\.abigen\\.go$'
- '.*\\.metadata\\.go$'
- '.*\\.pb\\.go$'
- '.*_gen.go$'
linters-settings:
gofmt:
simplify: true
govet:
# Don't report about shadowed variables
check-shadowing: false
misspell:
locale: US
gocritic:
disabled-checks:
- appendAssign
linters:
enable-all: true
disable:
# Global variables are used in many places throughout the code base.
- gochecknoglobals
# Some lines are over 80 characters on purpose and we don't want to make them
# even longer by marking them as 'nolint'.
- lll
# We don't care (enough) about misaligned structs to lint that.
- maligned
# We have long functions, especially in tests. Moving or renaming those would
# trigger funlen problems that we may not want to solve at that time.
- funlen
# Disable for now as we haven't yet tuned the sensitivity to our codebase
# yet. Enabling by default for example, would also force new contributors to
# potentially extensively refactor code, when they want to smaller change to
# land.
- gocyclo
# Instances of table driven tests that don't pre-allocate shouldn't trigger
# the linter.
- prealloc
# Init functions are used by loggers throughout the codebase.
- gochecknoinits
# this messes with formatting
- goimports
# TODO implement paralell tests
- paralleltest
# remove
- wsl
# skip for post set
- exhaustruct
- exhaustivestruct
# if short
- ifshort
# we want to use todo
- godox
# skip new line return until autofix works for it
- nlreturn
# go 1.13 error
- goerr113
# disable gci
- gci
# disable gofumpt
- gofumpt
# allow magic numbers
- gomnd
# allow println
- forbidigo
# disabled (todo: enable)
- interfacer
# Allow nolint
- nolintlint
# we use external json tags
- tagliatelle
# var name len
- varnamelen
# allow replacements
- gomoddirectives
# no need to disallow returning interfaces
- ireturn
- nonamedreturns
- contextcheck
- nosnakecase
- depguard
fast: false
issues:
# We use dot imports extensively in tests. Usually for testify assertions
exclude-rules:
- path: _test\.go
linters:
- revive
- stylecheck
# wrapping errors when exporting for testing is tedious
- path: export_test\.go
linters:
- wrapcheck
text: 'should not use dot imports'
- path: contracts/
linters:
- revive
text: 'and that stutters; consider calling this'
- path: ethergo/example/*
linters:
- wrapcheck
- path: testutil/*
linters:
- wrapcheck
- path: ethergo/*
linters:
- staticcheck
text: 'SA1019'
- path: \.resolvers\.go
linters:
- cyclop
exclude-use-default: false
new-from-rev: 5f8d480f4e3f1f2a318243a9924f50ec90ec4945