-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
48 lines (44 loc) · 1.13 KB
/
Copy path.golangci.yml
File metadata and controls
48 lines (44 loc) · 1.13 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
# golangci-lint configuration v2
version: "2"
run:
timeout: 5m
tests: true
linters:
enable:
- govet
- errcheck
- staticcheck
- ineffassign
- unused
- misspell
- gosec
- goconst
- gocyclo
- revive
- bodyclose
- noctx
settings:
errcheck:
# Writes to stdout and stderr in a CLI. A failed write to a closed pipe
# is not something this program can meaningfully recover from.
# Checking each one would bury the code that matters.
exclude-functions:
- fmt.Fprint
- fmt.Fprintf
- fmt.Fprintln
goconst:
# A test spells a rule name out as a literal on purpose. Asserting
# against a constant that the code under test also uses would prove
# nothing about the name. Without this, goconst counts those literals
# and reports the total against the one real occurrence in the registry.
ignore-tests: true
exclusions:
paths:
# Fixtures are deliberately bad Go. That is the point of them.
- ^testdata/
rules:
- path: _test\.go
linters:
- gosec
- goconst
- dupl