-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
127 lines (118 loc) · 2.46 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
116
117
118
119
120
121
122
123
124
125
126
127
run:
timeout: 10m
tests: true
linters:
enable:
- bodyclose
- cyclop
- decorder
- dupl
- errname
- errorlint
- copyloopvar
- forbidigo
- funlen
- gocheckcompilerdirectives
- goconst
- gocritic
- godox
- gofmt
- goimports
- gosec
- misspell
- musttag
- nestif
- nilnil
- nlreturn
- noctx
- nonamedreturns
- prealloc
- promlinter
- reassign
- revive
- tagalign
- testifylint
- unconvert
- unparam
- wastedassign
- whitespace
- wrapcheck
- wsl
disable:
- godot
- gofumpt # as we have gofmt
- gocyclo
linters-settings:
wsl:
# If true append is only allowed to be cuddled if appending value is
# matching variables, fields or types one line above. Default is true.
strict-append: true
# Allow calls and assignments to be cuddled as long as the lines have any
# matching variables, fields or types. Default is true.
allow-assign-and-call: true
# Allow multiline assignments to be cuddled. Default is true.
allow-multiline-assign: true
# Allow declarations (var) to be cuddled.
allow-cuddle-declarations: false
# Allow trailing comments in ending of blocks
allow-trailing-comment: false
# Force newlines in end of case at this limit (0 = never).
force-case-trailing-whitespace: 0
funlen:
lines: 120
statements: 80
wrapcheck:
ignoreSigs:
- .Errorf(
- errors.New(
- errors.Unwrap(
- .Wrap(
- .Wrapf(
- .WithMessage(
- .WithMessagef(
- .WithStack(
- .WithTags(
- .Combine(
- .Join(
ignorePackageGlobs:
- "encoding/*"
- "gopkg.in/yaml.v2*"
cyclop:
max-complexity: 15
issues:
new: true
max-issues-per-linter: 0
max-same-issues: 0
fix: false
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- lll
- funlen
- nilnil
- noctx
- path: testing.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- lll
- funlen
- nilnil
- noctx
- linters:
- lll
source: "^func"
# Exclude wannabe compiler
- path: /
linters:
- typecheck
exclude-files:
- ".*/bindata.go$"