feat: check descriptions and Rust type names for branding drift

The checker covered the identity strings a host sees, but not two other
kinds of template residue.

Descriptions: `Cargo.toml`'s `description` and `CLAP_DESCRIPTION` both
shipped as placeholders, and the latter surfaces in some host browsers.

Type names: `MyPlugin` and `PluginParams` appear at nine sites between
the struct definitions, the three trait impls, the two export macros and
the params field. Missing one is a compile error rather than silent drift,
so this is a convenience rather than a safety net - but naming the site
beats reading rustc, and the `Vst3Plugin` impl sits behind a cfg, so a
default build never reports it at all. Renaming the types is optional:
leave the canonical values alone and the checks stay green.

TODO markers are reported at a new informational level that never counts
toward pass/fail. They are legitimate while building, so failing on them
would just train you to ignore the run - but a finished plugin should not
quietly ship with five of them.

Two bugs surfaced while testing this:

- The stale scan drew its file list from `git ls-files`, which returns
  nothing outside a checkout. In an exported tarball every stale spelling
  was therefore reported absent - the section passed hardest exactly when
  it could see least. It now falls back to `find` and says which source
  it used.
- `grep -c` prints 0 and exits 1 when there are no matches, so the TODO
  count's `|| echo 0` appended a second zero and produced an unparseable
  value once a rename removed the last TODO.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WHt4DykxXaQnyaJfyS8KCn
This commit is contained in:
2026-08-29 10:29:06 +09:00
parent 26f3593b15
commit 3acab7bf7e
2 changed files with 67 additions and 1 deletions
+6
View File
@@ -30,6 +30,12 @@ while the docs and deploy script look for another.
sh check-branding.sh # exit 0 = consistent, 1 = drift found
```
It covers the identity a host actually sees (package and bundle names, `Plugin::NAME`,
`VENDOR`, `EMAIL`, `CLAP_ID`, `VST3_CLASS_ID`, the descriptions) and the Rust type names
(`MyPlugin`, `PluginParams`) at every site they appear. Renaming the types is cosmetic —
no host ever sees them — but leaving `MyPlugin` in a shipped plugin is the kind of residue
that says nobody read the file. Leave them as-is and those checks simply stay green.
To rename: edit the canonical block at the top of the script, run it, and fix everything
it reports. The placeholder spellings are pre-seeded into its `STALE` list, and each one
arms itself as soon as you change the matching canonical value — so leftovers surface