doc-validator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDocumentation Validator
文档验证工具
Validation Checks
验证检查
1. Completeness
1. 完整性
- Installation instructions present
- Usage examples provided
- API reference complete (if applicable)
- Troubleshooting section exists
- Contributing guidelines (if open source)
- 包含安装说明
- 提供使用示例
- API参考文档完整(如适用)
- 包含故障排除章节
- 贡献指南(如为开源项目)
2. Accuracy
2. 准确性
- Code examples are runnable
- Commands match actual CLI
- File paths exist
- Version numbers match package.json/pyproject.toml
- Links are not broken
- 代码示例可运行
- 命令与实际CLI一致
- 文件路径真实存在
- 版本号与package.json/pyproject.toml一致
- 链接未失效
3. Consistency
3. 一致性
- Terminology is consistent
- Code style in examples matches project
- Formatting is uniform
- Table of contents matches headings
- 术语保持一致
- 示例中的代码风格与项目一致
- 格式统一
- 目录与标题匹配
4. Quality
4. 质量
- No spelling/grammar errors
- Clear and concise language
- Proper markdown formatting
- Code blocks have language hints
- 无拼写/语法错误
- 语言清晰简洁
- Markdown格式规范
- 代码块包含语言提示
Process
验证流程
-
Find documentation filesbash
find . -name "*.md" -o -name "*.rst" -
Read and analyze
- Check structure (headings, sections)
- Verify code examples
- Validate links and references
-
Cross-reference with code
- Compare CLI commands with actual implementation
- Verify file paths exist
- Check version numbers
-
Report findings
- List issues by category
- Suggest improvements
- Provide examples of fixes
-
查找文档文件bash
find . -name "*.md" -o -name "*.rst" -
读取与分析
- 检查结构(标题、章节)
- 验证代码示例
- 验证链接与引用
-
与代码交叉验证
- 对比CLI命令与实际实现
- 验证文件路径真实存在
- 检查版本号
-
报告结果
- 按类别列出问题
- 提出改进建议
- 提供修复示例
Examples
使用示例
✅ Good trigger: "Check if our README is complete"
✅ Good trigger: "Validate the API documentation"
✅ Good trigger: "The docs mention /old-command but I don't see it in the code"
❌ Bad trigger: "Write new documentation" (creation, not validation)
❌ Bad trigger: "Fix typo in line 42" (too specific, not validation)
✅ 适用场景:"检查我们的README是否完整"
✅ 适用场景:"验证API文档"
✅ 适用场景:"文档中提到了/old-command,但我在代码里找不到"
❌ 不适用场景:"撰写新文档"(属于创建,非验证)
❌ 不适用场景:"修复第42行的拼写错误"(过于具体,不属于验证范畴)
Supporting Files
支持文件
For detailed validation rules, see references/validation-rules.md.
详细验证规则请查看references/validation-rules.md。