fix(validate): plain-text output has no leading pass/fail summary line

已关闭
#116 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust
领域
cli

调研方向

从 syscribe validate 命令的默认文本输出路径开始,运行干净、仅有警告以及受门控的验证用例。添加开头的摘要,但不要改变 --json 或退出代码的行为;完成的标准是摘要始终首先出现,并反映实际的通过/失败状态。

由索引模型根据 Issue 内容生成。

描述

enhancement

Summary

syscribe validate's default (non---json) text output has no leading pass/fail summary line. A clean run prints nothing; a warnings-only run jumps straight into Warnings (N): with no corresponding Errors (0) header ever printed. Answering "did this pass" from the plain-text mode means either noticing the absence of an Errors section (a fragile negative inference) or switching to --json and inspecting severities programmatically.

Motivation

Running syscribe validate after a batch of spec edits, the actual output was:

Warnings (51):

| Code | File | Message |
...

with no errors section at all — meaning it passed (0 errors), but the only way to confirm that from the text output was grep -c "^| E" for an empty result, since there's no explicit "0 errors" anywhere to read. --json solves this cleanly (structured severities), but the plain-text/human-facing mode — which is also what an LLM agent reads by default unless it specifically remembers to pass --json — leaves "did it pass" as an inference rather than a stated fact.

Proposed fix

Print a one-line summary banner at the very top of the default text output, always, regardless of whether there are findings:

0 errors, 51 warnings

or, when gated:

0 errors, 51 warnings (3 gated by --deny W308) — FAIL

Doesn't change --json's shape (already fine) or the exit-code contract — purely a legibility addition to the human/agent-default text path so "did this pass" is answerable by reading the first line, not by the absence of a section.

Acceptance criteria

  • A 0-error, 0-warning run prints an explicit 0 errors, 0 warnings line (not silence)
  • A warnings-only run's summary line appears before the Warnings (N): table, not after
  • The summary reflects gating flags (--deny/--max-warnings/--warnings-as-errors/--profile) when they change the effective pass/fail verdict
  • --json output is unchanged
主要语言
JavaScript
星标
8
派生
1
平均合并
3 小时 31 分钟
30 天内合并 PR
64

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sjames/syscribe 的其他 Issue

查看 sjames/syscribe 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。