Add --format json and --finding to spackle verify

オープン 初心者向け
#139 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
半日
初心者へのやさしさ
72/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
cli

調査の方向性

internal/cli/verify.go の runVerify(13〜69行目)から始めます。ここでは flagsConfig|flagsOffline のみを登録し、結果ごとに固定幅のテキストを出力しています。--finding の検証には internal/cli/report.go:70 の findingIDRe を再利用し、internal/engine/verify.go がどのように証明を受け取るかを確認してください。完了条件は、verify --format json がすべての結果を含む単一の JSON ドキュメントを出力すること、verify --finding <id> がその finding の証明のみを実行すること、未知の id は使い方のエラーになること、そして docs/config.md にフラグが一覧されていることです。

索引モデルが issue の本文から書いたものです。

説明

enhancement good first issue severity: low

Summary

spackle verify has no JSON output and always re-runs every stored proof. Every other inspection command now has --format json, and report gained --finding <id>.

Where

  • internal/cli/verify.go:13-69 (registers only flagsConfig|flagsOffline; fixed-width text per outcome)
  • internal/cli/report.go:70 (findingIDRe, reusable for validation)

Impact

Scripts and CI jobs that check whether a fix landed must scrape text to learn which finding still reproduces. A developer who fixed one finding has to wait for every proof in the run (each a sandbox start) to confirm it.

Steps to reproduce

spackle verify latest --format json and spackle verify latest --finding SPK-... both exit 2 as unknown flags.

Suggested fix

  • Add --format text|json, encoding {"outcomes":[{finding_id,title,state,note}],"still":n,"fixed":n,"not_verified":n}.
  • Add a repeatable --finding that filters the proofs passed to engine.Verify, validated with findingIDRe.
  • Keep the exit-code rule.

Acceptance criteria

  • verify --format json prints one JSON document with every outcome.
  • verify --finding <id> re-runs only that finding's proofs, and an unknown id is a usage error.
  • docs/config.md lists the new flags.

Getting started

  • Relevant files: internal/cli/verify.go, internal/engine/verify.go, docs/config.md
  • How to run tests: go test ./internal/cli ./internal/engine

Filed by repo-audit/full-audit at fffef43. Severity: low. Effort: S. audit-key: enhancement|internal/cli/verify.go|runVerify

主要言語
Go
スター
0
フォーク
1
PR マージ指標
30日以内にマージされた PR はありません

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/Spackle のほかの issue

TMHSDigital/Spackle の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。