3
3
# timeout for analysis, e.g. 30s, 5m, default is 1m
4
4
timeout : 1m
5
5
build-tags : integration
6
+ go : " 1.18.10"
6
7
7
8
issues :
8
9
# Maximum count of issues with the same text.
@@ -28,13 +29,12 @@ output:
28
29
linters :
29
30
disable-all : true
30
31
enable :
31
- - deadcode # finds unused code
32
32
- errcheck # checking for unchecked errors in go programs
33
33
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13.
34
34
- goconst # finds repeated strings that could be replaced by a constant
35
35
- dupl # tool for code clone detection
36
36
- forbidigo # forbids identifiers matched by reg exps
37
- # - gomoddirectives # manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
37
+ - gomoddirectives # manage the use of 'replace', 'retract', and 'excludes' directives in go.mod.
38
38
- gosimple # linter for Go source code that specializes in simplifying a code
39
39
- misspell # finds commonly misspelled English words in comments
40
40
- nakedret # finds naked returns in functions greater than a specified function length
@@ -48,9 +48,7 @@ linters:
48
48
- gomodguard
49
49
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
50
50
- ineffassign # detects when assignments to existing variables are not used
51
- - structcheck # finds unused struct fields
52
51
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code
53
- - varcheck # Finds unused global variables and constants
54
52
- asciicheck # simple linter to check that your code does not contain non-ASCII identifiers
55
53
- bodyclose # checks whether HTTP response body is closed successfully
56
54
- durationcheck # check for two durations multiplied together
@@ -61,8 +59,12 @@ linters:
61
59
- nilerr # finds the code that returns nil even if it checks that the error is not nil.
62
60
- noctx # noctx finds sending http request without context.Context
63
61
- unconvert # Remove unnecessary type conversions
64
- - wastedassign # wastedassign finds wasted assignment statements.
62
+ # - wastedassign # wastedassign finds wasted assignment statements. # NOTE disabled due to lack of generics support
65
63
# - godox # tool for detection of FIXME, TODO and other comment keywords
64
+ - asasalint
65
+ - bidichk
66
+ - gocheckcompilerdirectives
67
+ - tenv
66
68
67
69
68
70
# all available settings of specific linters
@@ -101,28 +103,7 @@ linters-settings:
101
103
# Allow local `replace` directives. Default is false.
102
104
replace-local : false
103
105
replace-allow-list :
104
- - github.com/Shopify/sarama
105
- - github.com/dop251/goja
106
- - github.com/fsnotify/fsevents
107
-
108
- gomodguard :
109
- blocked :
110
- # List of blocked modules.
111
- modules :
112
- - github.com/elastic/beats/v7 :
113
- reason : " There must be no Beats dependency, use elastic-agent-libs instead."
114
-
115
- gosimple :
116
- # Select the Go version to target. The default is '1.13'.
117
- go : " 1.18.10"
118
-
119
- misspell :
120
- # Correct spellings using locale preferences for US or UK.
121
- # Default is to use a neutral variety of English.
122
- # Setting locale to US will correct the British spelling of 'colour' to 'color'.
123
- # locale: US
124
- # ignore-words:
125
- # - IdP
106
+ - github.com/deepmap/oapi-codegen
126
107
127
108
nakedret :
128
109
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
@@ -147,23 +128,22 @@ linters-settings:
147
128
# Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
148
129
require-specific : true
149
130
150
- staticcheck :
151
- # Select the Go version to target. The default is '1.13'.
152
- go : " 1.18.10"
153
-
154
131
stylecheck :
155
- # Select the Go version to target. The default is '1.13'.
156
- go : " 1.18.10"
157
132
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", "ECS"]
158
133
159
-
160
134
unparam :
161
135
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
162
136
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
163
137
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
164
138
# with golangci-lint call it on a directory with the changed file.
165
139
check-exported : false
166
140
167
- unused :
168
- # Select the Go version to target. The default is '1.13'.
169
- go : " 1.18.10"
141
+ gomodguard :
142
+ blocked :
143
+ # List of blocked modules.
144
+ modules :
145
+ - github.com/elastic/beats/v7 :
146
+ reason : " There must be no Beats dependency, use elastic-agent-libs instead."
147
+ - github.com/elastic/beats/elastic-agent :
148
+ reason : " There must be no elastic-agent dependency, use elastic-agent-libs instead."
149
+
0 commit comments