diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ade7f8..f02fc6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,17 @@ across the whole thing, honestly*. ### Added +- **Generated-marker exclusion (opt-in)** (#114, plan 0002 Phase 2): with + `CHECKUP_EXCLUDE_GENERATED=1`, files whose head carries a **banner-shaped** + generated marker (Go `// Code generated … DO NOT EDIT.`, a comment-leader + `@generated`, or C# ``) are dropped from **both** the lizard + inventory and the scc keep-set — the lever that stops a codegen-heavy repo from + drowning the measurement (corvus: 39,208 → 3,569 source files) and pre-empts the + #105 lizard blow-ups. Markers are case-sensitive and anchored (not the loose + substrings a draft used), so first-party code that merely *quotes* a marker — or + owns a bare `DO NOT EDIT` (IaC, hand-written migrations) — is kept. Every drop is + **enumerated** to `raw/…​.generated` (loud, not a silent count). Default off until + field-tested; surfacing "% generated" as a headline signal is Phase 3. - **First-party source — the scc-based engines honour the inventory** (#109, plan 0002 Phase 1; closes #18): `codebase-stats`, stack-identity, the scc complexity arm and tech-viability now filter + re-aggregate a single diff --git a/lib/source-inventory.sh b/lib/source-inventory.sh index c965acc..53871c3 100644 --- a/lib/source-inventory.sh +++ b/lib/source-inventory.sh @@ -34,6 +34,17 @@ INV_JSTS_RE='\.(ts|tsx|js|jsx|mjs|cjs|svelte|vue)$' INV_NONJS_RE='\.(py|cs|java|kt|kts|go|rb|php|rs|c|cc|cpp|cxx|h|hpp|m|mm|swift|scala|lua)$' # lizard's non-JS slice (#68) INV_LIZARD_RE='\.(ts|tsx|js|jsx|py|cs|java|kt|kts|go|rb|php|rs|c|cc|cpp|cxx|h|hpp|m|mm|swift|scala|lua)$' # everything lizard tokenises +# Generated-file markers (#114, plan 0002 Phase 2). BANNER-SHAPED + case-sensitive, +# NOT loose substrings: the spike's `@generated|DO NOT EDIT|…` (case-insensitive) +# fired on first-party code that merely *mentions* a marker (codegen tooling, +# Flow/Relay, lint configs) or owns it (IaC `# DO NOT EDIT`, hand-written +# migrations) — Morlock M1. Three anchored forms, matched as whole comment lines: +# 1. Go canonical: `// Code generated . DO NOT EDIT.` (full line) +# 2. `@generated`: only inside a comment leader at line start (//, #, *, /*, --,