Make the docs check fail on an em dash in a page
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- markdown, python
- 领域
- documentation, testing
调研方向
从 check() 和 scripts/check_docs.py 中的模块文档字符串开始,然后检查 tests/test_check_docs.py 中的 make_project、run_check 和 test_page_missing_from_nav_fails。更新检查和测试,以处理长破折号,并在 CONTRIBUTING.md 和 CLAUDE.md 指定的章节中列出该规则。完成标准是:新测试覆盖拒绝情形和允许的破折号字符,并且文档中列出的检查均通过。
由索引模型根据 Issue 内容生成。
描述
What to change
CLAUDE.md and CONTRIBUTING.md both say: no em dashes. No check enforces that today, so a reviewer has to catch every one by eye. Add one to scripts/check_docs.py. That script already runs in CI before the build.
- In
check()inscripts/check_docs.py, read each Markdown page under the docs directory. Report aProblemfor every line that contains an em dash (the character U+2014, which you can write in Python as"\u2014"), with that line's number. Use a message such asem dash, use a comma, colon, or parentheses instead. Flag every em dash, including any in code: the rule allows none. Leave en dashes and hyphens alone. - Update the module docstring at the top of the script so it lists the new problem.
- Add tests to
tests/test_check_docs.pyusing the existingmake_projectandrun_checkhelpers:- A page with an em dash fails with exit code 1. The message names the file and the right line.
- A page with only hyphens and en dashes still passes.
- Add the new check to the lists of what the script fails on, in both places:
CONTRIBUTING.md, in the paragraph under "Preview locally" that begins "The strict build fails on".CLAUDE.md, in thescripts/check_docs.pybullet under "What this repository is".
The pages have no em dashes today, so the existing test_repository_pages_pass test should keep passing.
Where to look
scripts/check_docs.py: thecheck()function and the module docstring.tests/test_check_docs.py:make_project,run_check, andtest_page_missing_from_nav_failsas a model.CONTRIBUTING.md, heading "Preview locally".CLAUDE.md, heading "What this repository is".
How to test
From CONTRIBUTING.md:
uv sync
uv run pytest
uv run python scripts/check_docs.py
uv run zensical build --strict
Then try it by hand. Add an em dash to any page in docs/, run uv run python scripts/check_docs.py, and check that it prints that page and line and exits with 1 (echo $?). Take the em dash out before you commit.
Done when
-
uv run python scripts/check_docs.pyreports any em dash in a page underdocs/, with its file and line, and exits with 1. - New tests cover a page that fails and a page with hyphens and en dashes that passes.
- The script's docstring,
CONTRIBUTING.md, andCLAUDE.mdlist the new check. -
uv run pytest,uv run python scripts/check_docs.py, anduv run zensical build --strictall pass, and every commit is signed off (git commit -s).
- 主要语言
- Python
- 星标
- 0
- 派生
- 0
- 平均合并
- 10 小时 40 分钟
- 30 天内合并 PR
- 11
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openpickleball/developers 的其他 Issue
-
documentation good first issue
难度 1/5 1-3 小时 新手友好度 88/100
openpickleball/developers#20 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 1/5 1-3 小时 新手友好度 78/100
openpickleball/developers#18 · 1 条评论 ·
维护者通常 1 天内回复
查看 openpickleball/developers 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 69/100
-
frontend testing
难度 2/5 1-3 小时 新手友好度 84/100
vendrabuck/HERD#1588 ·
维护者通常 1 天内回复
-
Lessons: record the second case of L14 (security updates cover only pip)可能已有人在做 @vishwanathj 今天认领。 未关闭area/docs no-test-needed type/docs
难度 2/5 1-3 小时 新手友好度 76/100
vishwanathj/ocp_lab.ai#39 · 1 条评论 ·
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
laaielichter/Gulliver#228 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复