forked from NetApp/trident
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
64 lines (55 loc) · 1.51 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
run:
# Timeout for analysis, e.g. 30s, 5m.
# Default: 1m
timeout: 5m
linters:
disable-all: true
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default-linters
enable:
- gofumpt
- goimports
- govet
- errcheck
- gosec
# - lll
issues:
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
# Exclude `lll` issues for long lines with `go:generate`.
- linters:
- lll
source: "^//go:generate "
linters-settings:
gofumpt:
# Select the Go version to target.
# Default: 1.15
lang-version: "1.22"
# Choose whether to use the extra rules.
# Default: false
extra-rules: true
# Module path which contains the source code being formatted.
# Default: empty string
module-path: github.com/netapp/trident
goimports:
# Put imports beginning with prefix after 3rd-party packages.
# It's a comma-separated list of prefixes.
local-prefixes: github.com/netapp/trident
lll:
# Max line length, lines longer will be reported.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option.
# Default: 120.
line-length: 120
# Tab width in spaces.
# Default: 1
tab-width: 4
gosec:
excludes:
# Exclude TLS client side erorrs for now, until Trident fully supports TLS1.3
- 'G402' # Look for bad TLS connection settings