• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kahwee / bunki / 20407896688

21 Dec 2025 09:32AM UTC coverage: 88.378% (-2.9%) from 91.261%
20407896688

push

github

kahwee
feat: add comprehensive error handling and validation for markdown parsing

Implements robust error handling system to catch YAML frontmatter and other parsing errors earlier in the build process, addressing the issue where 131+ YAML errors went undetected in beconfused-com.

Key improvements:
- Added ParseError and ParseMarkdownResult interfaces for detailed error reporting
- Refactored parseMarkdownFile() to return errors instead of null
- Added error aggregation in parseMarkdownDirectory() with helpful summaries grouped by type (yaml, missing_field, other)
- Implemented strictMode config option to fail builds on parsing errors
- Created new 'bunki validate' command for pre-build validation
- Enhanced error messages with actionable suggestions (e.g., quote titles with colons)

Error handling features:
- YAML errors now include specific suggestions (quote colons, fix nested quotes)
- Missing field errors show which fields are required
- Error display limited to first 3-5 per category to avoid overwhelming output
- Errors logged but build continues in non-strict mode (default)
- Strict mode throws and exits with code 1 on any parsing errors

Testing:
- Updated all parseMarkdownFile tests to handle new ParseMarkdownResult return type
- All 287 tests pass
- TypeScript validation successful

This change enables CI/CD pipelines to catch content errors before deployment and provides clear, actionable feedback to content authors.

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

43 of 111 new or added lines in 3 files covered. (38.74%)

1749 of 1979 relevant lines covered (88.38%)

43.53 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

39.47
/src/parser.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc