harmonyos-review
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHarmonyOS Code Review
HarmonyOS代码评审
Audit HarmonyOS ArkTS projects against official Huawei guidelines. Generate prioritized fix reports.
依据华为官方指南审计HarmonyOS ArkTS项目,生成带优先级的修复报告。
Review Process
评审流程
1. Quick Scan
1. 快速扫描
Run in parallel to identify critical issues:
bash
undefined并行运行以识别关键问题:
bash
undefinedHardcoded credentials
Hardcoded credentials
grep -r "password|secret|key|token" --include=".json5" --include=".ets"
grep -r "password|secret|key|token" --include=".json5" --include=".ets"
console instead of hilog
console instead of hilog
grep -r "console." --include="*.ets" | grep -v "hilog"
grep -r "console." --include="*.ets" | grep -v "hilog"
async forEach anti-pattern
async forEach anti-pattern
grep -r "forEach.await" --include=".ets"
grep -r "forEach.await" --include=".ets"
API version check
API version check
grep -r "compileSdkVersion|targetSdkVersion" --include="*.json5"
grep -r "compileSdkVersion|targetSdkVersion" --include="*.json5"
Deprecated API usage
Deprecated API usage
grep -r "@Deprecated|deprecated" --include="*.ets"
undefinedgrep -r "@Deprecated|deprecated" --include="*.ets"
undefined2. Deep Analysis
2. 深度分析
Apply checklist from references/checklist.md per category.
按类别应用references/checklist.md中的检查清单。
3. Generate Report
3. 生成报告
Use references/report-template.md as base structure. Include:
- Executive summary (issue counts by priority)
- Detailed findings with references
file:line - Prioritized fix recommendations
- Overall grade (A-F)
以references/report-template.md为基础结构。报告需包含:
- 执行摘要(按优先级统计问题数量)
- 带有引用的详细问题发现
file:line - 优先级修复建议
- 整体评级(A-F)
References
参考资料
- Review checklist: references/checklist.md - All review criteria by category
- Official docs: references/official-docs.md - Huawei guidelines, Kit usage, API patterns
- Report template: references/report-template.md - Output format
- 评审检查清单:references/checklist.md - 按类别划分的所有评审标准
- 官方文档:references/official-docs.md - 华为指南、Kit使用方法、API模式
- 报告模板:references/report-template.md - 输出格式
Issue Priority
问题优先级
- Critical: Blocks release, fix immediately
- High: Fix soon, affects quality
- Medium: Technical debt, consider fixing
- Low: Optional optimization
- Critical(严重):阻碍发布,需立即修复
- High(高):尽快修复,影响质量
- Medium(中):技术债务,考虑修复
- Low(低):可选优化
Exit Criteria
退出标准
- All checklist categories reviewed
- Report generated at
docs/YYYY-MM-DD-review.md - Critical/high issues have fix suggestions with references
file:line
- 所有检查清单类别已完成评审
- 报告已生成至
docs/YYYY-MM-DD-review.md - 严重/高优先级问题已附带引用的修复建议
file:line