-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yml
80 lines (71 loc) · 1.9 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
# This file contains all available configuration options
# with their default values.
# options for analysis running
run:
# include test files or not, default is true
tests: true
timeout: 5m
# which dirs to skip: issues from them won't be reported;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but default dirs are skipped independently
# from this option's value (see skip-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work
# on Windows.
skip-dirs:
- pkg/kubernetes/fabric
- testing/mocks
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true
# Allow multiple parallel golangci-lint instances running.
# If false (default) - golangci-lint acquires file lock on start.
allow-parallel-runners: false
#issue:
# exclude-use-default: false
linters:
enable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- unused
- varcheck
- goimports
- typecheck
#- errorlint
- gofmt
- misspell
- nestif
- sqlclosecheck
- gosec
disable-all: true
#em, not sure it's needed for every lint though... I'll check it later :)
linters-settings:
gosimple:
go: "1.16"
staticcheck:
go: "1.16"
unused:
go: "1.16"
gosec:
# Available rules: https://github.com/securego/gosec#available-rules
excludes:
- G404
nestif:
min-complexity: 8
issues:
max-same-issues: 0
max-issues-per-linter: 0
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# Exclude some staticcheck messages
- linters:
- staticcheck
text: "SA1019:"
# Exclude some linters from running on tests files.
# - path: \.go
# linters:
# - typecheck