Repository navigation
Expand file tree
/
Copy path.golangci.yml
More file actions
61 lines (59 loc) · 1.57 KB
/
Copy path.golangci.yml
File metadata and controls
61 lines (59 loc) · 1.57 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
version: "2"
run:
timeout: 5m
tests: true
linters:
default: none
enable:
- bodyclose
- errcheck
- errorlint
- gocritic
- gosec
- govet
- ineffassign
- misspell
- nilerr
- revive
- staticcheck
- unconvert
- unused
settings:
gosec:
excludes:
# math/rand in tests is fine (G404). We use crypto/rand in production code.
- G404
# File inclusion via variable (G304) - we don't read user-supplied paths.
- G304
# TOCTOU in WalkDir (G122) - skill source_dir is configured by the
# operator before `terraform apply`; we don't traverse attacker-
# controlled filesystems. Same trust model as G304.
- G122
revive:
rules:
- name: var-naming
- name: package-comments
# `exported` is disabled because internal/* packages are not part of
# the public Go API surface — adding godoc to every helper would be
# noise. Per-file doc comments and types.go-style commentary cover the
# WHY where it matters.
- name: exported
disabled: true
errcheck:
# The test helpers intentionally ignore errors on response writes.
exclude-functions:
- (net/http.ResponseWriter).Write
- (encoding/json.Encoder).Encode
exclusions:
rules:
- path: _test\.go
linters:
- errcheck
- gosec
- bodyclose
- gocritic
- errorlint
- path: internal/provider/testutil_test\.go
linters:
- revive
- gocritic