Skip to content

Fix all pre-existing compliance test violations #25

@bilersan

Description

@bilersan

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 of Apache-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.NewlineLF instead of "\n"

4. Literal ".md" Strings (4 files)

  • Should use config.ExtMarkdown instead 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions