-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
72 lines (68 loc) · 1.64 KB
/
.golangci.yml
File metadata and controls
72 lines (68 loc) · 1.64 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
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
# https://golangci-lint.run/usage/configuration
version: "2"
run:
timeout: 5m
tests: true
concurrency: 4
linters:
enable:
- govet
- errcheck
- staticcheck
- revive
- ineffassign
- unused
- misspell
- nakedret
- bodyclose
- gocritic
- makezero
- gosec
- unconvert
- noctx
- prealloc
- whitespace
settings:
errcheck:
check-type-assertions: true
check-blank: false
staticcheck:
checks:
- all
- "-QF1008" # Allow embedded structs to be referenced by field
- "-ST1000" # Do not require package comments
govet:
enable-all: true
disable:
- fieldalignment
revive:
rules:
- name: exported
disabled: true
- name: package-comments
disabled: true
gosec:
# Exclude G301 (directory permissions) - workspace needs readable directories
# Exclude G304 (file inclusion) - paths are validated via safePath()
# Exclude G306 (file permissions) - workspace files need to be readable
excludes:
- G301
- G304
- G306
exclusions:
rules:
# G706 (log injection via taint) is added in newer gosec versions and
# not in our pinned CI golangci-lint v2.4 — listing it under
# gosec.excludes fails `config verify` there. Match by text instead so
# newer versions also stay quiet: slog's structured key/value logging
# is not a format-string injection vector.
- linters:
- gosec
text: "G706"
formatters:
enable:
- gofmt
- goimports
issues:
max-issues-per-linter: 50
max-same-issues: 10