-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.golangci.yml
More file actions
104 lines (88 loc) · 3.3 KB
/
.golangci.yml
File metadata and controls
104 lines (88 loc) · 3.3 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# AetherCore Layer 0 — Strict Lint Configuration
# Enforces zero external dependencies and maximum code quality for the Sacred Kernel.
# Run: golangci-lint run ./...
run:
timeout: 5m
go: "1.22"
linters:
enable-all: true
disable:
- exhaustruct # Struct literal exhaustiveness enforcement is too noisy
- gofumpt # Conflicts with standard gofmt in CI environments
- nlreturn # Overly strict blank-line style enforcement
- wsl # Whitespace linter produces false positives in our style
- godox # TODO/FIXME markers are intentional during active development
- paralleltest # Not all tests are safe to parallelize (pool state tests)
- depguard # External dependency policy is managed via go.mod directly
- ireturn # Interface return types are idiomatic for our adapter pattern
- varnamelen # Short variable names are idiomatic Go (ctx, t, e, err)
- tagliatelle # JSON tag naming convention enforcement is too strict
- mnd # Magic numbers are documented via named constants where it matters
- gochecknoglobals # Logger and telemetry singletons are intentional design
- testpackage # White-box testing with internal access is a valid Go pattern
- forbidigo # CLI commands legitimately use fmt.Print* for user-facing output
- wrapcheck # Not all error sites need explicit wrapping — too strict
- lll # Line length is flexible; long log calls are acceptable
- protogetter # Style preference; direct proto field access is fine in Layer 0
- err113 # Static sentinel errors aren't required at every fmt.Errorf call
- usetesting # t.Context() isn't universally available across Go versions
- tenv # Deprecated since v1.64.0; replaced by usetesting
- gci # Requires module-name section config; standard grouping already applied manually
- nonamedreturns # Conflicts with gocritic/unnamedResult: two same-type returns must be named
linters-settings:
gocognit:
min-complexity: 20
cyclop:
max-complexity: 15
funlen:
lines: 100
statements: 60
dupl:
threshold: 150
gocritic:
enabled-tags:
- diagnostic
- performance
- style
gosec:
excludes:
- G115 # Integer overflow conversion is safe in our telemetry context
revive:
rules:
- name: exported
severity: warning
- name: unexported-return
severity: warning
- name: var-naming
severity: warning
govet:
enable-all: true
disable:
- fieldalignment # Struct field reordering is a micro-opt; not required for correctness
nestif:
min-complexity: 8 # Default 5 is too strict for sandbox dispatch logic
staticcheck:
checks: ["all"]
issues:
exclude-rules:
# Test files have relaxed rules — allow longer functions and error skips
- path: "_test\\.go"
linters:
- errcheck
- funlen
- dupl
- gocognit
- cyclop
# CLI entrypoint is inherently complex (command routing, flag parsing)
- path: "cmd/"
linters:
- funlen
- cyclop
- gocognit
# Generated protobuf code — skip all linting
- path: "core/ipc/"
linters:
- all
max-issues-per-linter: 0
max-same-issues: 0
new: false