-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path.golangci.yml
More file actions
80 lines (67 loc) · 1.71 KB
/
.golangci.yml
File metadata and controls
80 lines (67 loc) · 1.71 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
73
74
75
76
77
78
79
80
# golangci-lint configuration for AIM
# Security-focused linting with gosec in audit mode.
run:
timeout: 5m
modules-download-mode: readonly
linters:
enable:
# Security
- gosec
- bodyclose
- sqlclosecheck
# Code quality
- govet
- staticcheck
- unused
- typecheck
disable:
- errcheck # Widespread unchecked returns — enable incrementally
- gosimple # Stylistic suggestions (S1009, S1039) — not security-relevant
- ineffassign # Pre-existing ineffectual assignments — fix in code cleanup PR
- misspell # Pre-existing misspellings — fix in code cleanup PR
linters-settings:
gosec:
# Audit mode: report all issues without filtering
config:
global:
audit: true
excludes:
- G101 # Hardcoded credentials in tests
- G115 # Integer overflow int->int32 (low risk, noisy)
- G201 # SQL string formatting (pre-existing, uses parameterized queries)
- G402 # TLS MinVersion (SMTP email service, tracked separately)
severity: medium
confidence: medium
govet:
enable-all: false
misspell:
locale: US
issues:
exclude-dirs:
- vendor
- testdata
- node_modules
exclude-rules:
# Allow unused params in interface implementations
- linters:
- unused
source: "^func \\(.*\\) "
# Relax security checks in test files
- path: _test\.go
linters:
- gosec
- bodyclose
# CLI entrypoints — interactive prompts, bootstrapping
- path: cmd/
linters:
- gosec
max-issues-per-linter: 0
max-same-issues: 0
output:
formats:
- format: colored-line-number
sort-results: true
sort-order:
- linter
- severity
- file