mdValidator.js is a quality control tool that validates the markdown files:
- ✅ Conference entry format - Ensures correct structure
- ✅ Date formats - Validates DD, DD-DD, DD/MM-DD/MM patterns
- ✅ Links - Checks for http/https URLs
- ✅ Spacing - Detects multiple spaces, long dashes
- ✅ Badges/Shields - Validates CFP, Closed Captions, Scholarship, Sponsoring badges
- ✅ Badge ordering - Ensures correct badge order
- ✅ Duplicate tags - Checks TAGS.csv for duplicates
- Exits with code
1if more than 1 validation error found - Exits with code
1if duplicate tags found - Allows workflow to continue if validation passes
❌ Does NOT generate files - No all-events.json creation
❌ Does NOT transform data - Pure validation only
❌ Is NOT required for tests - Tests only need mdParser.js output
# Skip mdValidator.js, run only mdParser.js
node mdParser.js
npm test -- --run
Result: ✅ All 32 tests PASS# Run both mdValidator.js and mdParser.js
node mdValidator.js
node mdParser.js
npm test -- --run
Result: ✅ All 32 tests PASS + Quality validation-
Quality Control 🎯
- Catches markdown formatting errors early
- Prevents malformed entries from being deployed
- Validates badge formats and ordering
-
Prevents Bad Data 🛡️
- Stops workflow if >1 formatting error
- Catches duplicate tags
- Ensures consistency across files
-
Zero Performance Impact ⚡
- Runs in milliseconds
- No overhead for normal workflows
- Fails fast on errors
-
Developer Feedback 💬
- Shows helpful hints for fixing errors
- Provides clear error messages
- Validates on every PR
- npm install (tools)
- node mdValidator.js # ✅ Validate first (fails fast)
- node mdParser.js # ✅ Generate files
- npm test # ✅ Run tests- Fail Fast - If markdown is invalid, stop immediately
- No Wasted Work - Don't generate files from bad data
- Clear Errors - Validation errors are more helpful than parse errors
- Tests Last - Only test if data is valid and generated
You could skip it:
- npm install (tools)
- node mdParser.js # Generate files without validation
- npm test # Tests still passBut you lose:
- ❌ Quality checks
- ❌ Early error detection
- ❌ Format validation
- ❌ Duplicate tag detection
✅ Keep mdValidator.js in workflows
The current workflow order is optimal:
- Validates markdown quality (fast fail)
- Generates JSON files
- Runs tests
Impact: Near-zero performance cost, significant quality benefits! 🚀