This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.golangci.yml
111 lines (103 loc) · 2.28 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
run:
timeout: 2m
# list of build tags, all linters use it. Default is empty list.
#build-tags:
# - wrap_test TODO currently broken
# Skip the eth bindings.
skip-dirs:
- backend/ethereum/bindings/
# Do not change go.{mod,sum}.
modules-download-mode: readonly
linters:
disable-all: true
fast: false
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- funlen
# We use init() functions.
#- gochecknoinits
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- golint
# This is stupid since it reports every constant as magic-number.
#- gomnd
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- interfacer
# This thing reports long lines, but we have a lot of them…
#- lll
- misspell
# We often just have a 'return' when using named returns.
#- nakedret
- nolintlint
- rowserrcheck
- scopelint
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- asciicheck
# We often use globals for backend stuff
#- gochecknoglobals
- gocognit
- godot
# Reports TODO/BUG/FIXME
#- godox
# Keeps reporting 'do not define dynamic errors, use wrapped static errors instead'.
#- goerr113
# We don't care about alignment right now.
#- maligned
- nestif
- prealloc
# This always reports that tests should be Black Box.
#- testpackage
#- wsl
issues:
exclude-rules:
- path: pkg/test
linters:
- stylecheck
- path: test
linters:
# 'Error return value … not checked'
- errcheck
- funlen
# Tests do not need to prealloc everything.
- prealloc
# `Id` instead of `ID` is fine in tests.
- path: test
text: " should be "
linters:
- golint
- stylecheck
# Allow nil contexts in tests.
- path: test
text: "SA1012"
linters:
- staticcheck
# Allow unchecked errors in tests.
- path: test
text: "G104"
linters:
- gosec
# Exclude lll issues for long lines with go:generate.
- linters:
- lll
source: "^//go:generate "
exclude-use-default: false