md-footer-template: "nothing was judged" should name the includes.byRule fix with its key

未关闭 适合新手
#501 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
devtools

调研方向

该消息由 src/laws/documentation/md-footer-template.ts 中的 nothingJudged 路径产生。先在那里阅读,然后在 modular-laws-registry.ts 中找到 lawConfigKey,以了解 includes.byRule 键是如何从 law 标题派生出来的。当某个项目的 includes 没有选择任何 .md 文件时,其上的消息包含带有派生键的 includes.byRule 提示,并且有测试覆盖该情况,即算完成。其他报告 'includes select none of them' 的 law 是可选的后续工作。

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

描述

enhancement

Version: after 8.0.0
Law: MD Footer Template (MANDATORY) — src/laws/documentation/md-footer-template.ts (nothingJudged)

What happens

When a project turns the opt-in law on while its includes.global names only source (for example src/**/*.ts), the law selects no Markdown file and reports:

8 Markdown file(s) exist, but the configured includes / ignores select none of them — nothing was judged

The cause is named, but not the fix. The run becomes partial, and the reader has to find out that the law takes its files through includes.byRule, under the key the registry sets for it (the slug of its title).

Suggested direction

Add the fix to the message, with the exact key:

… select none of them — nothing was judged. Give this law the Markdown files with includes.byRule: { "md-footer-template-mandatory": ["**/*.md"] }

Derive the key from the law's title the way the registry does (modular-laws-registry.ts, the lawConfigKey slug), not as a hard-coded string, so it stays right if the title changes. Red/green: the message on a project whose includes select no .md contains the includes.byRule hint with that key. The same pattern may apply to other laws that report "includes select none of them".

主要语言
TypeScript
星标
0
派生
0
平均合并
2 小时 36 分钟
30 天内合并 PR
168

环境准备

从这里开始

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

Rule-Of-Code/RoC 的其他 Issue

查看 Rule-Of-Code/RoC 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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