-
Notifications
You must be signed in to change notification settings - Fork 154
/
.golangci.yml
135 lines (132 loc) · 3.93 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
128
129
130
131
132
133
134
135
run:
tests: true
build-tags:
- rocksdb
linters-settings:
gofmt:
simplify: true
goimports:
local-prefixes: github.com/iotaledger
golint:
min-confidence: 0.9
gocyclo:
min-complexity: 15
govet:
check-shadowing: false
misspell:
locale: US
staticcheck:
checks: ["all"]
nlreturn:
block-size: 3
stylecheck:
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", "SIP", "RTP", "AMQP", "DB", "TS"]
linters:
# Disable all linters.
disable-all: true
# Enable specific linter
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
- varcheck
- asasalint
- asciicheck
- bidichk
- bodyclose
#- containedctx
- contextcheck
- decorder
#- depguard
- dogsled
#- dupl
- durationcheck
- errchkjson
- errname
#- errorlint
- execinquery
#- exhaustive
#- exhaustruct
- exportloopref
- forcetypeassert
- goconst
#- gocritic
- godot
#- godox
#- goerr113
- gofmt
- goheader
- goimports
- golint
#- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- grouper
- ifshort
- importas
#- interfacer
#- makezero
#- maligned
- misspell
#- nakedret
- nilerr
- nilnil
- nlreturn
- noctx
#- nonamedreturns
#- nosnakecase
#- nosprintfhostport
- prealloc
- predeclared
- promlinter
- revive
- rowserrcheck
#- scopelint
- sqlclosecheck
- structcheck
- stylecheck
- tagliatelle
- tenv
#- testpackage
#- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
#- varnamelen
- wastedassign
issues:
# Maximum issues count per one linter.
# Set to 0 to disable.
# Default: 50
max-issues-per-linter: 0
# Maximum count of issues with the same text.
# Set to 0 to disable.
# Default: 3
max-same-issues: 0
#exclude:
# - 'Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked' # errcheck
# - "err113: do not define dynamic errors, use wrapped static errors instead:" # goerr113
# - "type name will be used as [0-9A-Za-z_.]+ by other packages, and that stutters; consider calling this" # golint
# - "Potential file inclusion via variable" # gosec
# - "G404: Use of weak random number generator" # gosec
# - "Subprocess launch(ed with variable|ing should be audited)" # gosec
# - "Use of unsafe calls should be audited" # gosec
# - "G108: Profiling endpoint is automatically exposed on /debug/pprof" # gosec
# - "(Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)" # gosec
# - "G101: Potential hardcoded credentials" # gosec
# - "(G104|G307)" # gosec Duplicated errcheck checks.
# - "`[0-9A-Za-z_.]+` - `[0-9A-Za-z_.]+` always receives `[0-9A-Za-z_.]+`" # unparam
# - "should have comment .*or be unexported" # revive
# - "exported: comment on exported" # revive
# - "package-comments: package comment should be of the form" # revive
# - "blank-imports" # revive
# - "var-naming: don't use leading k in Go names;" #revive
# - 'shadow: declaration of "err"' # govet