-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.golangci.yml
115 lines (110 loc) · 2.33 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
111
112
113
114
115
version: "2"
formatters:
enable:
- gci
- gofumpt
settings:
gofumpt:
extra-rules: true
linters:
default: all
disable:
- cyclop # duplicate of gocyclo
- dupl
- exhaustive
- exhaustruct
- godot
- lll
- makezero
- nilnil
- nlreturn
- paralleltest
- prealloc
- rowserrcheck # not relevant (SQL)
- sqlclosecheck # not relevant (SQL)
- testpackage
- tparallel
- varnamelen
- wrapcheck
- wsl
settings:
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
forbidigo:
forbid:
- pattern: ^print(ln)?$
- pattern: ^spew\.Print(f|ln)?$
- pattern: ^spew\.Dump$
funlen:
lines: -1
statements: 50
goconst:
min-len: 5
min-occurrences: 3
gocritic:
disabled-checks:
- sloppyReassign
- rangeValCopy
- octalLiteral
- paramTypeCombine # already handle by gofumpt.extra-rules
# settings:
# hugeParam:
# sizeThreshold: 220 # todo must be improved
enabled-tags:
- diagnostic
- style
- performance
gocyclo:
min-complexity: 15
godox:
keywords:
- FIXME
gosec:
excludes:
- G204
govet:
disable:
- fieldalignment
enable-all: true
misspell:
locale: US
ignore-rules:
- hardlinked
- behaviour
mnd:
ignored-functions:
- os.*
perfsprint:
err-error: true
errorf: true
sprintf1: true
strconcat: false
tagliatelle:
case:
rules:
json: snake
exclusions:
warn-unused: true
presets:
- comments
rules:
- linters:
- funlen
path: (.+)_test.go
- path: branch/branch.go
text: func name will be used as branch.BranchName by other packages
- path: notes/notes_custom.go
text: func name will be used as notes.NotesRef by other packages
- path: doc.go
text: don't use an underscore in package name
- path: internal/generator.go
text: 'G306:'
issues:
max-issues-per-linter: 0
max-same-issues: 0