-
Notifications
You must be signed in to change notification settings - Fork 207
/
.golangci.yml
82 lines (78 loc) · 2.17 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
run:
timeout: 5m
issues:
exclude:
- SA4006 # Too many false positives :(
- SA5008 # Warns for duplicate struct tags which are meaningful to go-flags
- unslice # This may be useful in some places.
- ifElseChain # Generally don't agree.
- appendAssign
- halp # Make misspell be quiet about this.
- exitAfterDefer # Potentially useful but not in any cases it fires right now.
- receiver-naming # Think this is confused about generics
- error-strings
- unused-parameter # Potentially useful but we have quite a few cases to fix
- empty-block # generally not useful
- redefines-builtin-id
- superfluous-else
- indent-error-flow # revive getting a bit too pushy here
exclude-dirs:
- test_data
exclude-rules:
- path: _test\.go
linters:
- errcheck
- dupl
- gocritic
- path: src/core/config.go # The config struct is big & complex and there's usually only one.
text: fieldalignment
linters:
- govet
- path: src/please.go # Similarly for flags.
text: fieldalignment
linters:
- govet
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- dogsled
- dupl
- gci
- gocritic
- gofmt
- gosimple
- govet
- ineffassign
- misspell
- nilerr
- nosprintfhostport
- perfsprint
- prealloc
- revive
- staticcheck
- tenv
- thelper
- unconvert
- unused
- wastedassign
- whitespace
linters-settings:
govet:
enable-all: true
disable:
- deepequalerrors # Only seen this once and it's a false positive
- shadow # Probably not useful enough to clean everything up
# TODO(peterebden): Should clean up these warnings & enable (although they are pretty finicky)
- fieldalignment
gci:
sections:
- standard # Captures all standard packages if they do not match another section.
- default # Contains all imports that could not be matched to another section type.
- prefix(github.com/thought-machine/please)
perfsprint:
errorf: false # sometimes it's easier not to import another package