Misleading comments and small redundancies in the core path
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 75/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
- 領域
- cli, networking
調査の方向性
引用されている7行から始めてください。internal/output/writer.go と internal/tui/model.go の古いJSONコメント、internal/dns/resolver.go の resolveWithLog のログ呼び出し、main_session.go と main.go にまたがる validateArgs の重複呼び出し、そして tuiOptions 内の2つの fmt.Fprintf 警告です。コメントがストリーミング出力を説明しており、NODATA結果に対して -v が Error: <nil> を表示せず、重複した検証が削除され、TUIの警告が diag を経由するようになれば完了です。実際のドメインではなく、-simulate またはローカルのテストサーバーを使って make test で検証してください。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Go
- スター
- 1
- フォーク
- 1
- 平均マージ
- 6時間 42分
- マージ済み PR(30日)
- 7
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/subenum のほかの issue
-
area: docs documentation good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
TMHSDigital/subenum#327 ·
メンテナーはふだん 1 日以内に返信
-
area: release dependencies good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
TMHSDigital/subenum#324 ·
メンテナーはふだん 1 日以内に返信
-
ci good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
TMHSDigital/subenum#323 ·
メンテナーはふだん 1 日以内に返信
-
area: output bug good first issue severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
TMHSDigital/subenum#319 ·
メンテナーはふだん 1 日以内に返信
-
community documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
TMHSDigital/subenum#135 ·
メンテナーはふだん 1 日以内に返信
TMHSDigital/subenum の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
GillMacedo/godebugdiff#13 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
GillMacedo/racesift#14 ·
-
IsTextFile reads the whole file into memory (OOM on large files in the file watcher)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
gtsteffaniak/filebrowser#3395 ·
メンテナーはふだん 1 日以内に返信
-
effort:s impact:low raised-by:worker risk:low
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
medici-finance/assay#6496 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug require/reproduce require/severity
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信