-
Notifications
You must be signed in to change notification settings - Fork 23
/
.golangci.yml
95 lines (84 loc) · 3.75 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
run:
timeout: 3m
issues-exit-code: 1
concurrency: 4
allow-parallel-runners: true
tests: true
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
linters-settings:
cyclop:
max-complexity: 20
package-average: 0.0 # the maximal average package complexity. If it's higher than 0.0 (float) the check is enabled (default 0.0)
skip-tests: true
funlen:
lines: 60
statements: 40
golint:
min-confidence: 0.9
gci:
no-inline-comments: true
no-prefix-comments: true
sections:
- standard
- default
- prefix(github.com/albenik/go-serial)
section-separators:
- newLine
lll:
line-length: 140
linters:
enable-all: true
# Please keep in order
disable:
- deadcode # The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
- exhaustruct # Unnecessary annoying!
- exhaustivestruct # Unnecessary annoying!
- goerr113 # Useful but not in this package!
- gochecknoglobals # Too paranoid!
- goimports # Latest gci with sections is good enough
- golint # The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive.
- ifshort # The linter 'ifshort' is deprecated (since v1.48.0) due to: The repository of the linter has been deprecated by the owner.
- interfacer # The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner.
- ireturn # Yes! Some functions returns interfaces.
- maligned # The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. Replaced by govet 'fieldalignment'.
- nlreturn # Personally I hate mandatory blank lines before returns.
- nosnakecase # The linter 'nosnakecase' is deprecated (since v1.48.1) due to: The repository of the linter has been deprecated by the owner. Replaced by revive(var-naming).
- paralleltest
- rowserrcheck # rowserrcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
- scopelint # The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner. Replaced by exportloopref.
- structcheck # structcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
- testableexamples # New linter, project is not adapted for this linter yet.
- varcheck # The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
- varnamelen # Annoying!
- unparam # Panics with GOOS=linux
- wastedassign # wastedassign is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.
- wrapcheck # Not needed!
- wsl # Unnecessary annoying!
issues:
exclude-rules:
- path: _test\.go
linters:
- gochecknoglobals
- funlen
- lll
- wrapcheck
- path: enumerator/
linters:
- gci
- gofumpt
- revive
- text: "Line contains TODO/BUG/FIXME"
linters:
- godox
- source: "//go:generate"
linters:
- lll
- source: "C\\."
linters:
- unconvert
- source: "(?:dataBits:\\s+\\d+|baudRate:\\s+\\d+)"
linters:
- gomnd