Rechercher

PythonReactSEOPDF
GitHub Skill

name-fix-review

Reviews name_fixes.lua for duplicates, then removes them. Ensures numerical sort order.

jcdoll☆ 7 Étoiles du dépôt3 Forks du dépôt

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

Voir la source ↗Guides

Instructions

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
  1. Read backend/name_fixes.lua
  2. Parse each mapping line to extract AppID and HLTB name
  3. 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."

Exemples

Consultez les exemples du dépôt source.

Voir la source ↗

Historique source

Date d’indexation
2026-01-20
Mise à jour de l’index
2026-02-02
Branch
main

Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!