Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Exit-code and argument-handling leftovers: -r read errors exit 2, wordlist-gen ignores positionals and flags after them

Geschlossen
#120 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@kragent66-glitch arbeitet bereits daran.

Seit 06.10.2026.

  • #133 von @kragent66-glitch — offen

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
go
Bereich
cli

Rechercherichtung

Read main.go:582-584 and loadPool for the -r exit code, then inspect tools/wordlist-gen.go:156 and the shared argument-parsing helper. Run the existing tests and add cases for the specified file-error codes, positional arguments, invalid flags, and banner validation order. Done means tests pin the expected behavior and wordlist-gen acme.com exits 2 with a hint; linked PR #133 is already open.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area: cli bug good first issue priority: low

Evidence

  • A missing -r file exits 2 (main.go:582-584, loadPool error returns exitUsage). A missing -exclude-file, -dL, -w or -diff file exits 1. The exit-code table from #82 says I/O failures are 1.
  • tools/wordlist-gen.go:156 never checks fs.Args(). wordlist-gen acme.com -o - silently ignores acme.com and the -o - after it (the #29 class of bug), and writes ./wordlist.txt with 38 common entries. An invalid -combine and an empty -o exit 1 rather than 2.
  • UX nits: the SIMULATION banner prints before argument validation (subenum -simulate with no domain shows the banner, then "missing "), and a missing -exclude-file is reported before a missing domain.

Suggested approach

  • Return exitFailure for I/O errors in loadPool and keep 2 for parse errors.
  • In wordlist-gen, use interspersed parsing (same helper as main) and reject positionals with "did you mean -domain?" (exit 2).
  • Validate arguments before printing banners.

Done when

Tests pin each exit code, and wordlist-gen acme.com exits 2 with a hint.

Vorherrschende Sprache
Go
Sterne
1
Forks
1
Ø Merge
5 T. 2 Std.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

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 TMHSDigital/subenum

Alle Issues in TMHSDigital/subenum

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

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