-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
40 lines (36 loc) · 1.18 KB
/
.golangci.yml
File metadata and controls
40 lines (36 loc) · 1.18 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
# golangci-lint configuration
# Docs: https://golangci-lint.run/usage/configuration/
run:
timeout: 5m
modules-download-mode: readonly
linters:
enable:
- gosec # Security: hardcoded credentials, unsafe crypto, etc.
- govet # Correctness checks (built-in)
- errcheck # Unhandled errors
- staticcheck # Static analysis
- unused # Unused code
- ineffassign # Ineffectual assignments
- misspell # Spelling mistakes in comments/strings
linters-settings:
gosec:
# Disable noisy rules with high false-positive rate in this codebase:
# G304: file path from variable (we intentionally accept user paths in some places)
# G115: integer overflow (too many false positives in Go 1.22+)
excludes:
- G304
- G115
severity: medium
issues:
# Don't fail on generated files or vendor
exclude-dirs:
- vendor
- dashboard
# Relax specific noisy rules for test files only;
# gosec still runs on test code to catch hardcoded secrets/weak crypto.
exclude-rules:
- path: "_test\.go"
linters: [errcheck, ineffassign]
# Surface all findings (don't cap per-linter)
max-issues-per-linter: 0
max-same-issues: 0