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

Đang mở Phù hợp với người mới
#139 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu tại internal/cli/verify.go, hàm runVerify (dòng 13-69), hàm này chỉ đăng ký flagsConfig|flagsOffline và in văn bản cố định độ rộng cho từng kết quả. Tái sử dụng findingIDRe từ internal/cli/report.go:70 để kiểm tra --finding, rồi xem internal/engine/verify.go nhận bằng chứng như thế nào. Hoàn thành khi verify --format json in ra một tài liệu JSON duy nhất chứa mọi kết quả, verify --finding <id> chỉ chạy bằng chứng của finding đó, id không tồn tại là lỗi sử dụng, và docs/config.md liệt kê các cờ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Go
Star
0
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TMHSDigital/Spackle

Tất cả issue của TMHSDigital/Spackle

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.