Summary
The CATEGORY_TOTALS map in .github/workflows/checklist-score.yml is hardcoded:
CATEGORY_TOTALS = {
"basics": 8,
"change_control": 6,
"reporting": 8,
"quality": 11,
"security": 9,
"analysis": 7,
}
These values must be manually updated whenever checklist items are added to or removed from BestPracticesChecklist.md, which is error-prone and creates a maintenance burden.
Proposed Fix
Replace the hardcoded map with a dynamic computation that reads BestPracticesChecklist.md at runtime, locates each category heading, and counts all checklist lines (matching - [ ], - [x], - [X], - [~]) under each heading. This way, totals are always in sync with the actual checklist content without any manual updates.
References
Reported by: @kpj2006
Summary
The
CATEGORY_TOTALSmap in.github/workflows/checklist-score.ymlis hardcoded:These values must be manually updated whenever checklist items are added to or removed from
BestPracticesChecklist.md, which is error-prone and creates a maintenance burden.Proposed Fix
Replace the hardcoded map with a dynamic computation that reads
BestPracticesChecklist.mdat runtime, locates each category heading, and counts all checklist lines (matching- [ ],- [x],- [X],- [~]) under each heading. This way, totals are always in sync with the actual checklist content without any manual updates.References
Reported by: @kpj2006