Fix docs drift, shared regex literals, CI wording and redefined loop variables, with the gates that would have caught them

Aperta
#608 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing, tooling

Direzione di ricerca

Start with docs/architecture.md and the listed definitions in c_family/layout.py, c_family/sanitizers.py, cmake/syntax.py, autotools/configure_syntax.py, facts/shell_values.py, and facts/expansion.py; inspect the existing tests and Ruff configuration. Implement the documented checks and fixes across the named files, then run the test suite. Done means all fixes land and each requested gate runs in tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Fixes

  • docs/architecture.md:45 names pretty.py, which no longer exists.
  • Duplicated regex literals: the CMake truthy set (c_family/layout.py:23, c_family/sanitizers.py:23), the identifier regex (cmake/syntax.py:74, autotools/configure_syntax.py:20), and $VAR/${VAR} (facts/shell_values.py:369, facts/expansion.py:359).
  • Wording: "found in CI configuration" (9 times) becomes "found in what CI runs" (1 time today), with the snapshots.
  • PLW2901: 7 redefined loop variables.

Gates

  • A docs drift test: every *.py, *.toml or project_validator/... path named in docs/*.md and the README must exist, with a short allowlist for user-facing examples.
  • ruff PLW2901, PLR1714 (2 hits today) and PLW0603 (0).
  • SLF001 for tests/ as a count that may only fall, starting at 43.
  • A duplicate-definition AST check: a name bound twice in one module or class body fails (skipping @overload, property setters and if TYPE_CHECKING).

Done when

All fixes land and every gate runs in the test suite.

Split from #543. Checked against main at 4b4dbb6c on 2026-12-03: the cases above were reproduced with small fixtures or found in the code.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

Lingua principale
Python
Stelle
4
Fork
1
Merge medio
6h 31m
PR unite (30g)
238

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cpp-best-practices/project_validator

Tutte le issue di cpp-best-practices/project_validator

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.