Laws report a count where they could report the artefacts (violationDetails is unused by 223 of 225 laws)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript
- 领域
- tooling
调研方向
Start by reading the LawResult definition and the console renderer’s handling of violationDetails, then inspect laws that already populate that channel and laws that count resolved files. For each suitable law, identify the evidence it actually has and report it without removing the aggregate violation line. Done when applicable laws expose useful per-violation evidence and the existing truncation and --verbose behavior still applies.
由索引模型根据 Issue 内容生成。
描述
Split out of #42, which fixed the part that needed no new plumbing: the
suggestions laws already compute are no longer discarded by the renderer.
This is the part that does need plumbing.
The state of it
LawResult has a violationDetails channel — { file, line, column, message } — and the console renderer already displays it under
📁 Affected files:, with truncation and a --verbose override.
Two law files out of 225 populate it.
So the mechanism for "this violation, at this path, on this line" exists,
is rendered, and is almost entirely unused. Laws report an aggregate string
instead: "21 source files lack corresponding test files", "115 magic numbers found". The count is derived from a list the law had in hand and
then let go of.
Why it matters
From the consumer report that prompted #42:
To answer "which 21 files", we wrote a script that walks the tree, pairs
sources with specs and categorises what is left. [...] it found 26 where
the law found 21, and we never learned where the difference lay.We could not tell whether the 5-file discrepancy was our script being
wrong or the law counting something we could not see, so we could not
argue about the law's correctness on the evidence.
That last sentence is the cost. A law that cannot show its evidence cannot
be argued with, and a law that cannot be argued with gets parked. Our own
detectionLimits are the same idea applied to the law's design; this is
the same honesty applied to its output.
It is also the cheapest false-positive detector we could have. Several of
the defects closed in #41 would have been visible on sight if the law had
named the artefacts — jest.preset.js appearing in a list of "source files
lacking tests" needs no analysis at all.
Scope
- Populate
violationDetailswherever a law counts files it has already
resolved. Not every law can: some are answering "does this project
declare X" and have a config key rather than a path — those should carry
the key and the paths searched. - Keep the aggregate violation line. It is the right summary; the detail
belongs underneath it. - Truncation and
--verboseare already handled by the renderer.
Deliberately not a single sweep: this is per-law work with a per-law
judgement about what the evidence actually is, and a mass edit that
populates the field with something vague would be worse than the current
honest silence.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- 平均合并
- 38 分钟
- 30 天内合并 PR
- 96
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Rule-Of-Code/RoC 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
Rule-Of-Code/RoC#436 ·
维护者通常 1 天内回复
-
bug
难度 5/5 一周以上 新手友好度 35/100
Rule-Of-Code/RoC#439 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 49/100
Rule-Of-Code/RoC#438 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 53/100
Rule-Of-Code/RoC#437 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 74/100
Rule-Of-Code/RoC#435 ·
维护者通常 1 天内回复
相似的 Issue
-
ready-for-agent
难度 1/5 1 小时以内 新手友好度 86/100
LucasSantana-Dev/Lucky#3257 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
XiaomiMiMo/MiMo-Code#2849 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
danielmiessler/LifeOS#2894 ·
维护者通常 5 天内回复
-
enhancement frontend good first issue help wanted testing-infrastructure
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
enhancement follow-up
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复