Documentation
¶
Overview ¶
Package entityidaudit implements a bounded fixture-hygiene lint over statically identifiable entity-ID-shaped source candidates. It does not prove implementation-surface coverage or enforcement.
Index ¶
- func Audit(roots ...string) ([]Candidate, []Finding, error)
- func AuditRepository(root string, includeUntracked bool) ([]Candidate, []Finding, error)
- func MarshalReport(report Report) ([]byte, error)
- type Candidate
- type Count
- type Finding
- type Language
- type Report
- type Result
- type Summary
- type ValueCorpus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Audit ¶
Audit walks roots, returns a stable source corpus, and reports every invalid value that is not deliberately classified in its source file.
func AuditRepository ¶
AuditRepository audits one Git repository using a single reproducible source enumeration. Untracked files participate only when explicitly requested; ignored files never participate.
func MarshalReport ¶
MarshalReport serializes the on-demand diagnostic report.
Types ¶
type Candidate ¶
type Candidate struct {
File string `json:"file"`
Line int `json:"line"`
Column int `json:"column"`
Language Language `json:"language"`
Value string `json:"value"`
Surface string `json:"surface"`
Status string `json:"status"`
Reason string `json:"reason,omitempty"`
Classification Language `json:"classification,omitempty"`
ClassificationReason string `json:"classification_reason,omitempty"`
}
Candidate records one structurally extracted entity-ID value.
type Language ¶
type Language string
Language is one of the three entity-ID contract languages or one of the explicit source-corpus classifications.
const ( // LanguageLiteral is one complete six-part stored identity. LanguageLiteral Language = "literal" // LanguageDeclarationPattern is one exact six-position wildcard declaration. LanguageDeclarationPattern Language = "declaration-pattern" // LanguageQueryPrefix is one non-empty one-to-six-part literal query prefix. LanguageQueryPrefix Language = "query-prefix" LanguageUnrelatedGlob Language = "unrelated-glob" // LanguageIntentionalMalformed marks a deliberate negative contract fixture. LanguageIntentionalMalformed Language = "intentional-malformed" // LanguageIntentionalSentinel marks an exact empty value whose surrounding // contract explicitly gives it non-entity semantics, such as match-all. LanguageIntentionalSentinel Language = "intentional-sentinel" // LanguageIntentionalTemplate marks an exact pre-substitution expression // whose resolved runtime value must satisfy the entity-ID contract. LanguageIntentionalTemplate Language = "intentional-template" )
type Report ¶
type Report struct {
Version int `json:"version"`
Roots []string `json:"roots"`
SourceSet string `json:"source_set"`
Summary Summary `json:"summary"`
ValueCorpus ValueCorpus `json:"value_corpus"`
}
Report is an on-demand machine-readable local entity-ID source corpus. It is diagnostic output, not a checked-in release artifact.
type Summary ¶
type Summary struct {
CandidateCount int `json:"candidate_count"`
FindingCount int `json:"finding_count"`
CandidatesByLanguage []Count `json:"candidates_by_language"`
FindingsByLanguage []Count `json:"findings_by_language"`
FindingsByReason []Count `json:"findings_by_reason"`
}
Summary carries deterministic aggregate counts for a corpus report.
type ValueCorpus ¶
type ValueCorpus struct {
Candidates []Candidate `json:"candidates"`
}
ValueCorpus separates concrete values and their required changes from the diagnostic report envelope.