Misleading comments and small redundancies in the core path
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- cli, networking
Línea de trabajo
Empieza por las siete líneas citadas: los comentarios JSON obsoletos en internal/output/writer.go y internal/tui/model.go, la llamada de registro resolveWithLog en internal/dns/resolver.go, la llamada duplicada a validateArgs entre main_session.go y main.go, y las dos advertencias fmt.Fprintf en tuiOptions. Se considera terminado cuando los comentarios describen la salida en streaming, -v ya no muestra Error: <nil> para un resultado NODATA, se elimina la validación duplicada y las advertencias de la TUI pasan por diag. Verifica con make test usando -simulate o el servidor de pruebas local, no un dominio en vivo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
A checklist of small items: three comments that still say JSON output is buffered, a verbose log line that labels a definitive negative as a failure with Error: <nil>, a validation call that runs twice, and two TUI warnings that bypass the diagnostics writer.
Where
internal/output/writer.go:28internal/tui/model.go:329internal/tui/model.go:346internal/dns/resolver.go:479main_session.go:288main.go:304main_session.go:230
Details
Checklist, each item read at the cited line:
- writer.go:28: "FormatJSON buffers results and emits a single JSON array at completion". Since #181 it streams each element (
writeJSONElement, writer.go:255-284); the comment onEmitat 175-178 says so correctly. - tui/model.go:329-330 and 346-347: "finalize structured output so buffered JSON/CSV is written" and "buffered JSON array emitted": same stale description of JSON.
- resolver.go:478-479:
l.Logf("Failed to resolve: %s (Error: %v) in %s", domain, err, elapsed)also runs when the lookup succeeded with no records of the requested types (err == nil, the NODATA caseResolvehandles at 500-505), so-vprintsFailed to resolve: x (Error: <nil>)for a definitive negative. - main_session.go:288 calls
validateArgs, andvalidateFlags(called at 318) calls it again as its first statement (main.go:304). The second call can never fail. - main_session.go:230 and 240:
tuiOptionswrites its two warnings straight to stderr withfmt.Fprintf, bypassing thediagwriter built ten lines earlier (main_session.go:162), so-tui -log-format jsonemits plain text lines among JSON ones.
Impact
Readers are told JSON output is held in memory when it is not (relevant to anyone reasoning about memory or partial output), verbose logs label negatives as failures, and two small inconsistencies add noise. None changes results.
Suggested fix
Reword the three comments to "streamed as array elements; Finish closes the array". In resolveWithLog, branch on err == nil and log "No records: %s (%s) in %s". Drop the validateArgs call from validateFlags or from configure. Route the two TUI warnings through diag.Notice.
Acceptance criteria
- Each checklist item under Details is fixed
-
-vno longer printsError: <nil>
Getting started
- Relevant files:
internal/output/writer.go,internal/tui/model.go,internal/dns/resolver.go,main_session.go - How to run tests:
make test(orgo test ./...). Tests must stay hermetic: use-simulate,-simulate-zoneor the local DNS test server, never a live domain. - Related docs:
docs/DEVELOPER_GUIDE.md,docs/ARCHITECTURE.md
Filed by repo-audit/full-audit at d0c56f0. Severity: low. Effort: S. audit-key: tech-debt|internal/output/writer.go|comments
- Lenguaje dominante
- Go
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 6 h 42 min
- PR fusionados (30 d)
- 7
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TMHSDigital/subenum
-
area: docs documentation good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
TMHSDigital/subenum#327 ·
Los mantenedores suelen responder en 1 día
-
area: release dependencies good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
TMHSDigital/subenum#324 ·
Los mantenedores suelen responder en 1 día
-
ci good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
TMHSDigital/subenum#323 ·
Los mantenedores suelen responder en 1 día
-
area: output bug good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
TMHSDigital/subenum#319 ·
Los mantenedores suelen responder en 1 día
-
community documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
TMHSDigital/subenum#135 ·
Los mantenedores suelen responder en 1 día
Todos los issues de TMHSDigital/subenum
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
GillMacedo/godebugdiff#13 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
GillMacedo/racesift#14 ·
-
IsTextFile reads the whole file into memory (OOM on large files in the file watcher)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
gtsteffaniak/filebrowser#3395 ·
Los mantenedores suelen responder en 1 día
-
effort:s impact:low raised-by:worker risk:low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
medici-finance/assay#6496 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
kind/bug require/reproduce require/severity
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día