A flag before a path hides the path from the reach check

Offen
#574 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
cli, tooling

Rechercherichtung

Start with _given, _read_paths and _missed in facts/tools.py, then inspect how commands are represented in policy/inert_commands.toml. Reproduce the listed commands and their plain forms with small fixtures. Done means each flagged command is treated as a no run with the path named in the reason, while plain forms still behave as before.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

#499 made a run on a path that doesn't exist, /dev/null or a folder with no files of the unit's languages earn nothing. That works only when the path comes right after the tool. _given and _read_paths in facts/tools.py take the word after any bare option as that option's value, so a flag in front of the path hides it. All of these are still credited:

  • shfmt -d /dev/null, shellcheck -x /dev/null
  • fprettify --diff empty/
  • ruff check --fix nothing/, mypy --strict nothing/
  • pytest --cov-branch gone/

Expected

  • A per-tool table in policy/inert_commands.toml of the options that take a value. Every other option is a flag, so the next word is a path.
  • _given, _read_paths and _missed use the table.

Done when

Each command above is no run, with the path named in the reason, and the plain forms still behave as today.

Split from #476. 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

Vorherrschende Sprache
Python
Sterne
4
Forks
1
Ø Merge
6 Std. 31 Min.
Gemergte PRs (30 T.)
238

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus cpp-best-practices/project_validator

Alle Issues in cpp-best-practices/project_validator

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.