Documentation
¶
Overview ¶
Package prosegate scans a project's tracked text files for the seven banned typographic punctuation substitutes (ADR-0119). It is the presence-level counterpart to the net-increase audit rule in internal/audit: this package answers "is the tree clean", not "did this commit make it worse".
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Banned = map[rune]string{
'\u2014': "em-dash (U+2014)",
'\u2013': "en-dash (U+2013)",
'\u2026': "ellipsis (U+2026)",
'\u2018': "left single quote (U+2018)",
'\u2019': "right single quote (U+2019)",
'\u201c': "left double quote (U+201C)",
'\u201d': "right double quote (U+201D)",
}
Banned maps each banned rune to its display name. Each key is written as an escape, never as the character: this file is itself a tracked file the scan reads, so a typed glyph here would make the scanner fail its own gate. internal/project/residue_scan_test.go's bannedRunes map is the precedent and must stay in agreement with this one. Notation (arrows, mathematical symbols, accented letters) is deliberately absent: this is a closed blocklist of substitutes for ASCII punctuation, never an ASCII-only allowlist.
Functions ¶
func Categories ¶ added in v0.30.0
func Categories(findings []Finding, skipped []string) ([]presentation.ReportCategory, error)
Categories maps prose scan results into their check-report vocabulary.
func ParseCodepoint ¶
ParseCodepoint turns a "U+2014" spelling into its rune. It rejects anything outside the banned set, so a typo cannot silently widen an exemption.