-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.golangci.yml
110 lines (107 loc) · 2.47 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
run:
timeout: 2m
linters-settings:
govet:
enable-all: true
disable:
- fieldalignment
gocyclo:
min-complexity: 12
goconst:
min-len: 3
min-occurrences: 3
misspell:
locale: US
gofumpt:
extra-rules: true
depguard:
rules:
main:
deny:
- pkg: "github.com/instana/testify"
desc: not allowed
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package
godox:
keywords:
- FIXME
nolintlint:
allow-unused: false
require-explanation: true
require-specific: true
gocritic:
enabled-tags:
- diagnostic
- style
- performance
disabled-checks:
- unnamedResult
- sloppyReassign
- rangeValCopy
- octalLiteral
- paramTypeCombine # already handle by gofumpt.extra-rules
- whyNoLint # already handle by nolintlint
settings:
hugeParam:
sizeThreshold: 100
forbidigo:
forbid:
# - ^panic$
- ^print(ln)?$
# - ^fmt\.Print(ln|f)?$
- ^spew\.Print(f|ln)?$
- ^spew\.Dump$
- ^spew\.(F|S)dump(f|ln)?$
tagliatelle:
case:
rules:
json: snake
gosec:
excludes:
- 'G101' # Potential hardcoded credentials
- 'G301' # Expect directory permissions to be 0750 or less
- 'G304' # Potential file inclusion via variable
- 'G307' # Deferring unsafe method "Close" on type "*os.File"
- 'G306' # Expect WriteFile permissions to be 0600 or less
linters:
enable-all: true
disable:
- exportloopref # deprecated
- gomnd # deprecated
- execinquery # deprecated
- sqlclosecheck # not relevant (SQL)
- rowserrcheck # not relevant (SQL)
- cyclop # duplicate of gocyclo
- lll
- dupl
- prealloc
- wsl
- nlreturn
- err113
- mnd
- wrapcheck
- testpackage
- paralleltest
- tparallel
- nestif
- exhaustive
- exhaustruct
- varnamelen
- nilnil
issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
exclude:
- 'ST1000: at least one file in a package should have a package comment'
- 'package-comments: should have a package comment'
exclude-rules:
- path: meta/version.go
text: '(version|date|commit) is a global variable'
- path: config/config.go
text: 'getPathFunc is a global variable'
- path: (.+)_test.go
linters:
- funlen
- path: (.+)_test.go
text: 'fieldalignment: '