name-fix-review
Reviews name_fixes.lua for duplicates, then removes them. Ensures numerical sort order.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Name Fix Review
Cleans up backend/name_fixes.lua by removing duplicates and ensuring numerical sort order.
Instructions
Step 1: Run tests to check current state
cmd //c "busted tests/name_fixes_spec.lua"
Report whether tests pass or fail.
If busted is not available, see docs/development.md section "Running Lua Tests" for setup instructions.
Step 2: Read and parse the file
- Read
backend/name_fixes.lua - Parse each mapping line to extract AppID and HLTB name
- Identify issues:
- Duplicates: Same AppID appearing more than once (keep first occurrence)
Note: No-ops are not possible with AppID-based keys (the key is a number, the value is a string).
Step 3: Remove duplicates (if any)
Use targeted Edit operations to remove duplicate lines (keep the first occurrence).
IMPORTANT: Only use Edit to delete problematic lines. Do not rewrite content.
Step 4: Verify numerical sort order
Check that AppIDs are in ascending numerical order. If not sorted:
Use this bash pipeline to sort numerically while preserving exact bytes:
head -n 6 backend/name_fixes.lua > backend/name_fixes_sorted.lua && \
grep '^\s*\[' backend/name_fixes.lua | sort -t'[' -k2 -n >> backend/name_fixes_sorted.lua && \
echo "}" >> backend/name_fixes_sorted.lua && \
mv backend/name_fixes_sorted.lua backend/name_fixes.lua
Step 5: Verify
Run tests again to confirm the file is valid:
cmd //c "busted tests/name_fixes_spec.lua"
Output Format
Running tests...
[PASS/FAIL]
Found N issue(s):
- Removed duplicate: AppID {id}
Sorted N entries numerically.
Verifying...
[PASS]
Done.
If no issues found and already sorted, report "No changes needed."
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-02-02
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!