-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yaml
93 lines (80 loc) · 2.26 KB
/
.golangci.yaml
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
# Options for analysis running.
run:
# Timeout for analysis, e.g. 30s, 5m. Default: 1m
timeout: 15s
modules-download-mode: readonly
# Include test files or not. Default: true
tests: true
# 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 of 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:
- .custom-hooks
- .github
- .task
- .trunk
- .vscode
- assets
- build
- dist
- templates
- tools
# Which files to skip: they will be analyzed, but issues from them won't be reported.
# Default value is empty list,
# but there is no need to include all autogenerated files,
# we confidently recognize autogenerated files.
# If it's not please let us know.
# "/" will be replaced by current OS file path separator to properly work on Windows.
# Allow multiple parallel golangci-lint instances running; If false (default) - golangci-lint acquires file lock on start.
allow-parallel-runners: true
concurrency: 8
linters:
disable-all: true
fast: true
enable:
- gocyclo
- govet
- maintidx
- misspell
- unused
- unparam
#- errcheck
#- funlen
#- gocritic
#- gocyclo
#- goimports
#- gosec
#- gosimple
#- ineffassign
#- nestif
#- revive
#- staticcheck
#- typecheck
#- unused
severity:
default-severity: warning
case-sensitive: false
linters-settings:
gocyclo:
min-complexity: 20
funlen:
lines: 100
statements: 80
gocritic:
disabled-checks:
- exitAfterDefer
gosec:
severity: medium
config:
G301: "0755" # Maximum allowed permissions mode for os.Mkdir and os.MkdirAll - Default: "0750"
G302: "0644" # Maximum allowed permissions mode for os.OpenFile and os.Chmod - Default: "0600"
G306: "0644" # Maximum allowed permissions mode for os.WriteFile and ioutil.WriteFile - Default: "0600"
maintidx:
under: 25
misspell:
locale: US
nestif:
max-nesting: 3
min-complexity: 4 # Minimal complexity of if statements to report. - Default: 5