-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.golangci.yml
59 lines (55 loc) · 1.7 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
run:
timeout: 5m
skip-dirs-use-default: false
modules-download-mode: readonly
allow-parallel-runners: true
linters:
# TODO: fix errors so that all of the linters below pass.
# The linters that are commented out, as well as those explicitly disabled,
# are currently failing. We should fix those failures or define exclusion
# rules, and then enable those linters.
disable-all: true
enable:
- gofmt
- goimports
- gosec
- govet
- ineffassign
- misspell
- revive
- staticcheck
- structcheck
- unused
- varcheck
linters-settings:
gosimple:
go: "1.19"
gofmt:
simplify: false
golint:
minConfidence: 0
unused:
go: "1.19"
govet:
enable-all: true
disable:
- fieldalignment
- shadow
stylecheck:
# Select the Go version to target. The default is '1.13'.
go: "1.19"
# https://staticcheck.io/docs/options#checks
checks: [ "all", "-S1*", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-SA5011", "-SA1019", "-SA2002"]
# 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" ]
nakedret:
# default 30
max-func-lines: 100
gocyclo:
# default 30
max-complexity: 100