Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Engine messages hard-code CLI flag names; give them structured codes instead

Fechada
#100 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Refatoração
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
go

Direção de pesquisa

Start by reading the message strings in internal/scan/runner.go, options.go, scope.go, verdict.go, internal/dns/resolver.go and transport.go, then inspect the rewrite tables in pkg/subenum/subenum.go and their tests. The issue allows either structured codes and settings or neutral setting names, but replacing message parsing across engine and front ends is broad design work. Done means no engine message hard-codes CLI flags and the CLI, TUI and pkg/subenum each present settings in their own terms without parsing message text.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

area: scan enhancement

Why it matters

Engine messages name command-line flags ("Use -force to scan anyway", "set -max-queries or -force", "concurrency (-t) must be at least 1"). That reads well in the CLI but is wrong anywhere else: the TUI has form fields, and pkg/subenum callers have Config fields, not flags.

Evidence

  • About 40 flag references in message strings across internal/scan/runner.go, options.go, scope.go, verdict.go and internal/dns/resolver.go, transport.go.
  • pkg/subenum works around this with a regexp that rewrites -flag to the matching Config field (flagFields and fieldNames in pkg/subenum/subenum.go). It works and is tested, but a new message that names a flag missing from the table gets through unchanged.

Suggested approach

  • Give events and validation errors a structured part: a code such as wildcard_refused or cap_reached, and the setting involved (force, max_queries). Each front end then writes its own wording.
  • Or, as a smaller step, have the engine refer to settings by neutral names and let each front end map them.
  • Delete the regexp rewrite in pkg/subenum once the engine no longer writes flag names.

Done when

No engine message hard-codes a CLI flag, and the CLI, the TUI and pkg/subenum each name settings in their own terms without parsing message text.

Linguagem predominante
Go
Estrelas
1
Forks
1
Merge médio
5d 2h
PRs com merge (30d)
3

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de TMHSDigital/subenum

Todas as issues de TMHSDigital/subenum

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.