From 2fc0547a501a882c8b369ab62b09b2f2a8e8a6a8 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 20 Oct 2026 02:25:12 +0200 Subject: [PATCH] fix: check the banned vocabulary in tracked text The project bans a short list of marketing words in what it publishes, and no test read for them: the site's platform table described Recalbox's interface with one. The line now says what Recalbox does, and test_prose_style fails on any of those words in a tracked file. --- scripts/generate_site.py | 2 +- tests/test_prose_style.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/scripts/generate_site.py b/scripts/generate_site.py index df98933c..68898f68 100644 --- a/scripts/generate_site.py +++ b/scripts/generate_site.py @@ -4205,7 +4205,7 @@ open them depends on their name: | RetroArch (native) | Installed via package manager or AppImage | [RetroArch]({rel}) | `~/.config/retroarch/system/` | | RetroArch (Flatpak) | Installed from Flathub | [RetroArch]({rel}) | `~/.var/app/org.libretro.RetroArch/config/retroarch/system/` | | [Batocera](https://batocera.org/) | Bootable OS dedicated to gaming, runs from USB or full install, supports PC and SBC | [Batocera]({rel}) | `/userdata/bios/` | -| [Recalbox](https://www.recalbox.com/) | Bootable OS for retro gaming, streamlined interface, auto-configured | [Recalbox]({rel}) | `/recalbox/share/bios/` | +| [Recalbox](https://www.recalbox.com/) | Bootable OS for retro gaming that configures its emulators itself | [Recalbox]({rel}) | `/recalbox/share/bios/` | ### macOS diff --git a/tests/test_prose_style.py b/tests/test_prose_style.py index 236f180b..f990019c 100644 --- a/tests/test_prose_style.py +++ b/tests/test_prose_style.py @@ -120,6 +120,27 @@ class NoGeneratedTypography(unittest.TestCase): self.assertEqual(offenders, [], "\n".join(offenders[:40])) +class NoMarketingVocabulary(unittest.TestCase): + """The project bans these words in published text, and nothing checked + it: "streamlined interface" reached the site's platform table.""" + + WORDS = re.compile( + r"\b(comprehensive|robust|seamless(ly)?|leverag\w*|streamlin\w*|delv(e|ing))\b", + re.IGNORECASE, + ) + + def test_no_tracked_text_uses_them(self): + offenders = [] + for path in _tracked(): + if path.name == "test_prose_style.py": + continue + text = path.read_text(encoding="utf-8", errors="replace") + for number, line in enumerate(text.splitlines(), 1): + if self.WORDS.search(line): + offenders.append(f"{path.relative_to(ROOT)}:{number}: {line.strip()[:100]}") + self.assertEqual(offenders, [], "\n".join(offenders[:40])) + + class NoClauseSemicolons(unittest.TestCase): def _check(self, files: list[Path], extract) -> None: offenders = []