darnit plan --profile still refuses after #597 fixed the reason

Geschlossen Anfängerfreundlich
#709 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 3 Tagen

Ein zugehöriger Pull Request wurde bereits gemerged.

  • #713 von @JohnsonLyu — gemerged

Bewertung

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

Rechercherichtung

Die Ablehnung steckt in cmd_plan, und ihr Kommentar verweist auf #568, das geschlossen ist. Vergleiche sie mit cmd_audit, das Controls bereits über _resolve_profile_ids eingrenzt. Reproduziere mit darnit plan --profile level1_quick <repo> und bestätige, dass es mit Code 1 beendet wird. Fertig ist, wenn plan das Profil akzeptiert, nur die ausgewählten Controls ausgibt und für ein unbekanntes Profil oder eine leere Auswahl dieselben Fehler wie audit zurückgibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

module-core needs triage

darnit plan --profile still refuses, and the reason it gives no longer applies.

#576 made darnit audit --profile filter the controls and left plan refusing the flag, because plan crashed on frameworks whose controls carry no level (#568), so the flag couldn't be wired in a way that could be tested on the Baseline. #597 fixed that crash and closed #568.

On main (155dcc1b), on jonschlinkert/is-odd:

  • darnit plan <repo> exits 0 and prints the plan.
  • darnit plan --profile level1_quick <repo> exits 1 with darnit plan does not support --profile yet (#568); use darnit audit --profile, which points at a closed issue.
  • darnit audit --profile level1_quick <repo> audits 26 of the 66 controls.

Suggested fix: narrow the plan with _resolve_profile_ids as cmd_audit does, with the same errors for an unknown profile or an empty selection, and remove the refusal and its comment in cmd_plan.


Drafted with AI assistance (Claude), reviewed and filed by me. Measurements quoted were executed and verified.

Vorherrschende Sprache
Python
Sterne
22
Forks
27
Ø Merge
5 T. 2 Std.
Gemergte PRs (30 T.)
78

Entwicklungsumgebung

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 darnitdevorg/darnit

Alle Issues in darnitdevorg/darnit

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

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