-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Problem
The compliance test suite (internal/compliance/compliance_test.go) detects ~50 pre-existing violations across 5 categories in the codebase. These were introduced before the compliance tests were added and block the pre-commit hook from passing cleanly.
Violations Found
1. SPDX License Headers (11 files)
- 6 files had truncated
Apache-2.instead ofApache-2.0 - 5 files had no SPDX header at all
2. Missing doc.go Files (11 packages)
- bootstrap, cli/decision, cli/task, context, crypto, drift, index, rc, recall/parser, task, tpl
3. Literal "\n" Strings (9 files)
- Should use
config.NewlineLFinstead of"\n"
4. Literal ".md" Strings (4 files)
- Should use
config.ExtMarkdowninstead of".md"
5. cmd.Printf/cmd.PrintErrf Usage (20 files)
- Should use
cmd.Println(fmt.Sprintf(...))/cmd.PrintErrln(fmt.Sprintf(...))
Impact
- Pre-commit hook fails on compliance checks
- All 5 compliance test categories (TestLicenseHeader, TestDocGoExists, TestNoLiteralNewline, TestNoLiteralMdExtension, TestNoCmdPrintf) report failures
- Total: 46 files affected across the codebase
Fix
Branch fix/compliance-violations addresses all violations. Build compiles, go vet clean, all 5 compliance tests pass.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels