forked from xiegeo/modbusone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
75 lines (66 loc) · 1.78 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
# golangci-lint run
linters-settings:
govet:
check-shadowing: true
linters:
enable-all: true
disable:
# might be good to have for future refactoring
- wrapcheck
- goerr113
- gocyclo
- cyclop
- exhaustive
- durationcheck
- errname
# generally disabled linters
- nolintlint
- errcheck
- gochecknoglobals
- gocognit
- lll
- gomnd
- wsl
- scopelint
- funlen
- nestif
- paralleltest
- promlinter # Prometheus not used, also panics on run
- varnamelen
- nlreturn
- exhaustruct
- nonamedreturns
- testpackage
- thelper
- ireturn
# officially deprecated
- nosnakecase
- maligned
- exhaustivestruct
- deadcode
- ifshort
- varcheck
- interfacer
- structcheck
- golint
issues:
exclude-rules:
- path: "(.+)_test.go"
linters:
- maintidx
- unused
- path: "(.+)_test.go"
linters:
- govet
text: "declaration of \"t\" shadows declaration"
exclude:
- "G104: Errors unhandled." # turn off errcheck
- "declaration of \"[a-z]\" shadows declaration at .*_test.go" # ignore shadowing a single character variables in tests
- "receiver name [a-z]0 should be consistent with previous receiver name [a-z]" # when we want to operate on a copy
- "ST1016: methods on the same type should have the same receiver name .seen .. \"[a-z]0\", .. \"[a-z]\""
- "error strings should not be capitalized or end with punctuation or a newline" # doesn't matter
- "lines are duplicate of `crc.crc.go:" # ignore duplications in crc.go
- "package should be `crc_test` instead of `crc`" # ignore white listed internal testing
- "Top level comment should end in a period"
output:
format: line-number