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.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 02:25:12 +02:00
1 parent 8da4757538
commit 2fc0547a50
2 files changed
+22 -1

No files matched your search

+1 -1
View File
@@ -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
+21
View File
@@ -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 = []