-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
46 lines (44 loc) · 1.23 KB
/
Copy path.golangci.yml
File metadata and controls
46 lines (44 loc) · 1.23 KB
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
version: "2"
linters:
enable:
- errcheck
- govet
- staticcheck
- unused
- gosec
- revive
- errorlint
disable:
- lll
exclusions:
rules:
# Don't require error checks on test helpers that rarely fail.
- path: "_test\\.go"
linters:
- errcheck
text: "Error return value of .*(t\\.Setenv|t\\.Chdir|os\\.Setenv).*is not checked"
# gosec: integer overflow conversion in test files is acceptable.
- path: "_test\\.go"
linters:
- gosec
text: "G115"
# gosec: test helpers use standard 0755/0644 permissions for temp directories and files.
- path: "_test\\.go"
linters:
- gosec
text: "Expect directory permissions to be 0750 or less"
- path: "_test\\.go"
linters:
- gosec
text: "Expect WriteFile permissions to be 0600 or less"
# gosec: test files reference well-known credential file paths as
# fixtures (e.g. .aws/credentials, .ssh/id_rsa) for the permission
# secrets-denylist tests. These are paths, not real credentials.
- path: "_test\\.go"
linters:
- gosec
text: "G101"
formatters:
enable:
- gofmt
- goimports