-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yml
117 lines (115 loc) · 2.73 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
---
linters-settings:
gocyclo:
min-complexity: 15
exhaustive:
ignore-enum-types: "crypto.+"
varnamelen:
ignore-names:
- err
- serial
- ca
- ok
ignore-decls:
- w http.ResponseWriter
- h http.Handler
- r *http.Request
tagliatelle:
case:
rules:
yaml: snake
gosec:
excludes:
- G401 # OCSP repponder uses SHA1
- G505 # OCSP repponder uses SHA1
revive:
rules:
- name: struct-tag
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
disabled: true
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
disabled: true
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: empty-block
- name: superfluous-else
- name: unused-parameter
disabled: true
- name: unreachable-code
- name: redefines-builtin-id
depguard:
rules:
main:
deny:
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package
funlen:
lines: 120
statements: 120
linters:
enable-all: true
disable:
# Temp
- copyloopvar
- err113
- exhaustruct
- predeclared
- perfsprint
# Opt outs
- testpackage # Too Strict
- wrapcheck # Too Strict
- nolintlint # Too Strict
- wsl # Too Strict
- nlreturn # Too Strict
- nonamedreturns # Too Strict
- cyclop # Use gocyclo
- exhaustive # Use gocyclo
issues:
exclude-rules:
- linters:
- funlen # Too strict
path: 'main.go'
- linters:
- wrapcheck # Too strict
- funlen # Too strict
- cyclop # Use gocyclo
- noctx # Too strict
- nilerr # Too strict
- exhaustruct # Too strict
- goconst # Too strict
- gocognit # Too strict
- unparam # Too strict
- goerr113 # Too strict
- maintidx # Too strict
- lll # Too strict
path: '((.+)_test|testing)\.go'
- text: Potential HTTP request made with variable url
path: '((.+)_test|testing)\.go'
linters:
- gosec
- text: Use of weak random number generator
path: '((.+)_test|testing)\.go'
linters:
- gosec
- text: variable name 'd' is too short for the scope of its usage
path: '((.+)_test|testing)\.go'
linters:
- varnamelen
- path: 'exp_ctl_test.go'
linters:
- dupl