This repository is currently being migrated. It's locked while the migration is in progress.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.golangci.yml
83 lines (65 loc) · 1.81 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
# Run on code only in the new commits
new: true
run:
# Max 1 minute
timeout: 1m
# Return an exit code of 1 when a linter fails
issues-exit-code: 1
# Include test files
tests: true
# Use the vendored 3rd party libs
#modules-download-mode: release
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
# print lines of code with issue, default is true
print-issued-lines: true
# print linter name in the end of issue text, default is true
print-linter-name: true
linters:
enable:
- golint
- gosec
- unconvert
- gocyclo
- goimports
- nakedret
- scopelint
linter-settings:
gocyclo:
min-complexity: 20
goimports:
local-prefixes: code.storageos.net
errcheck:
# report about not checking of errors in type assertions: `a := b.(MyStruct)`;
# default is false: such cases aren't reported by default.
check-type-assertions: true
issues:
exclude-use-default: false
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gocyclo
- errcheck
- gosec
- linters:
- errcheck
text: Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
- linters:
- gosec
text: "G104: Errors unhandled"
- linters:
- gosec
text: "G204: Subprocess launched with variable"
- linters:
- gosec
text: "G304: Potential file inclusion via variable"
- linters:
- gosec
text: 'G307: Deferring unsafe method "\*os\.File" on type "Close"'
- path: mock_.+\.go
text: "should have comment or be unexported"
linters:
- golint