generated from permafrost-dev/go-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yaml
88 lines (76 loc) · 2.35 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
# Options for analysis running.
run:
# Timeout for analysis, e.g. 30s, 5m. Default: 1m
timeout: 30s
modules-download-mode: mod
# Include test files or not. Default: true
tests: false
# 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:
- dist
- build
- .github
- .vscode
- .custom-hooks
- assets
- 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.
skip-files:
- tools/*.go
# - cmd/**/version.go
# - app/**/version.go
# Allow multiple parallel golangci-lint instances running; If false (default) - golangci-lint acquires file lock on start.
allow-parallel-runners: true
concurrency: 4
linters:
enable:
# - errcheck
# - funlen
# - gocritic
# - gocyclo
# - goimports
# - gosec
- gosimple
- govet
# - ineffassign
- maintidx
- misspell
- nestif
# - revive
- staticcheck
- typecheck
- unparam
# - unused
severity:
default-severity: warning
case-sensitive: false
linters-settings:
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"
# Show functions with maintainability index lower than N. A high index indicates better maintainability (opposite of complexity). - Default: 20
maintidx:
under: 25
misspell:
locale: US
nestif:
max-nesting: 3
min-complexity: 4 # Minimal complexity of if statements to report. - Default: 5