-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.golangci.yaml
135 lines (124 loc) · 2.5 KB
/
.golangci.yaml
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
128
129
130
131
132
133
134
135
run:
# number of concurrent linters
concurrency: 4
# exit code when issues were found
issues-exit-code: 1
tests: true
issues:
exclude-dirs:
- vendor$
output:
formats:
- format: colored-line-number
path: stdout
print-issued-lines: true
print-linter-name: true
uniq-by-line: true
sort-results: true
linters-settings:
errcheck:
# Check type assertions
check-type-assertions: false
# Check assignments on blank identifiers
check-blank: false
lll:
line-length: 150
tab-width: 4
govet:
# Check for shadowed variables
enable:
- shadow
gofmt:
simplify: true
gosec:
# Exclude files that were generated by the protocol buffer compiler
exclude-generated: false
severity: medium
confidence: medium
excludes:
# Poor file permissions used when writing to a new file
- G306
misspell:
locale: US
staticcheck:
checks: ["all", "-SA1019"]
stylecheck:
checks:
["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022"]
# https://staticcheck.io/docs/options#dot_import_whitelist
dot-import-whitelist:
- fmt
# https://staticcheck.io/docs/options#initialisms
initialisms:
[
"ACL",
"API",
"ASCII",
"CPU",
"CSS",
"DNS",
"EOF",
"GUID",
"HTML",
"HTTP",
"HTTPS",
"ID",
"IP",
"JSON",
"QPS",
"RAM",
"RPC",
"SLA",
"SMTP",
"SQL",
"SSH",
"TCP",
"TLS",
"TTL",
"UDP",
"UI",
"GID",
"UID",
"UUID",
"URI",
"URL",
"UTF8",
"VM",
"XML",
"XMPP",
"XSRF",
"XSS",
]
# https://staticcheck.io/docs/options#http_status_code_whitelist
http-status-code-whitelist: ["200", "400", "404", "500"]
whitespace:
# Enforces newlines (or comments) after every multi-line if statement
multi-if: true
# Enforces newlines (or comments) after every multi-line function signature
multi-func: true
linters:
enable-all: true
disable:
- copyloopvar
- depguard
- dupl
- err113
- execinquery
- exhaustruct
- forbidigo
- funlen
- gochecknoinits
- goconst
- godot
- gofumpt
- gomnd
- intrange
- mnd
- paralleltest
- rowserrcheck
- sqlclosecheck
- tagliatelle
- tparallel
- varnamelen
- wastedassign
- wrapcheck