1
1
# SPDX-FileCopyrightText: 2024 Intel Corporation
2
2
# Copyright 2019 free5GC.org
3
+ #
3
4
# SPDX-License-Identifier: Apache-2.0
5
+ #
4
6
5
7
# This file contains all available configuration options
6
8
# with their default values.
25
27
skip-dirs :
26
28
# default is true. Enables skipping of directories:
27
29
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
28
- skip-dirs-use-default : true
29
30
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
30
31
# If invoked with -mod=readonly, the go command is disallowed from the implicit
31
32
# automatic updating of go.mod described above. Instead, it fails when any changes
@@ -46,8 +47,6 @@ output:
46
47
print-issued-lines : true
47
48
# print linter name in the end of issue text, default is true
48
49
print-linter-name : true
49
- # make issues output unique by line, default is true
50
- uniq-by-line : true
51
50
# all available settings of specific linters
52
51
linters-settings :
53
52
errcheck :
@@ -119,7 +118,7 @@ linters-settings:
119
118
goimports :
120
119
# put imports beginning with prefix after 3rd-party packages;
121
120
# it's a comma-separated list of prefixes
122
- local-prefixes : github.com/org/ project
121
+ local-prefixes : github.com/omec- project
123
122
golint :
124
123
# minimal confidence for issues, default is 0.8
125
124
min-confidence : 0.8
@@ -157,13 +156,10 @@ linters-settings:
157
156
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
158
157
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
159
158
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
160
- # enable or disable analyzers by name
161
- enable :
162
- - atomicalign
163
- - fieldalignment
164
- enable-all : false
159
+ # enable all analyzers
160
+ enable-all : true
165
161
disable :
166
- - shadow
162
+ # - fieldalignment
167
163
disable-all : false
168
164
depguard :
169
165
list-type : blacklist
@@ -200,36 +196,59 @@ linters-settings:
200
196
misspell :
201
197
# locale: US
202
198
ignore-words :
199
+ wsl :
200
+ # If true append is only allowed to be cuddled if appending value is
201
+ # matching variables, fields or types on line above. Default is true.
202
+ strict-append : true
203
+ # Allow calls and assignments to be cuddled as long as the lines have any
204
+ # matching variables, fields or types. Default is true.
205
+ allow-assign-and-call : true
206
+ # Allow multiline assignments to be cuddled. Default is true.
207
+ allow-multiline-assign : true
208
+ # Allow declarations (var) to be cuddled.
209
+ allow-cuddle-declarations : false
210
+ # Allow trailing comments in ending of blocks
211
+ allow-trailing-comment : true
212
+ # Force newlines in end of case at this limit (0 = never).
213
+ force-case-trailing-whitespace : 0
214
+ # Force cuddling of err checks with err var assignment
215
+ force-err-cuddling : false
216
+ # Allow leading comments to be separated with empty liens
217
+ allow-separated-leading-comment : false
203
218
custom :
204
219
# Each custom linter should have a unique name.
205
220
206
221
linters :
207
222
enable :
208
223
- gofmt
209
- - govet
210
- - errcheck
211
- - staticcheck
224
+ # - govet
225
+ # - errcheck
212
226
- unused
213
227
- gosimple
214
228
- ineffassign
215
229
- typecheck
216
230
# Additional
217
- - lll
231
+ # - lll
218
232
- godox
219
233
# - mnd
220
- - nestif
221
234
- goconst
222
- - gocognit
235
+ # - gocognit
236
+ # - nestif
237
+ # - gomodguard
223
238
- nakedret
224
239
- gci
225
240
- misspell
226
241
- gofumpt
227
- - whitespace
242
+ # - whitespace
228
243
- unconvert
229
- - predeclared
244
+ # - predeclared
230
245
- noctx
231
246
- dogsled
247
+ # - bodyclose
232
248
- asciicheck
249
+ # - stylecheck
250
+ # - unparam
251
+ # - wsl
233
252
234
253
# disable-all: false
235
254
fast : true
@@ -240,21 +259,13 @@ issues:
240
259
# excluded by default patterns execute `golangci-lint run --help`
241
260
exclude :
242
261
# Excluding configuration per-path, per-linter, per-text and per-source
243
- exclude-files :
244
- - nas.go
245
- - nas_test.go
246
- exclude-dirs :
247
- - nasConvert
248
- - nasMessage
249
- - nasType
250
- - nasTestpacket
251
262
exclude-rules :
252
263
# Exclude some linters from running on tests files.
253
264
# Independently from option `exclude` we use default exclude patterns,
254
265
# it can be disabled by this option. To list all
255
266
# excluded by default patterns execute `golangci-lint run --help`.
256
267
# Default value for this option is true.
257
- exclude-use-default : false
268
+ exclude-use-default : true
258
269
# The default value is false. If set to true exclude and exclude-rules
259
270
# regular expressions become case sensitive.
260
271
exclude-case-sensitive : false
@@ -276,6 +287,7 @@ issues:
276
287
new-from-rev : " "
277
288
# Show only new issues created in git patch with set file path.
278
289
# new-from-patch: path/to/patch/file
290
+ uniq-by-line : true
279
291
severity :
280
292
# Default value is empty string.
281
293
# Set the default severity for issues. If severity rules are defined and the issues
0 commit comments