codespan
Beautiful diagnostic reporting for text-based programming languages - crystal port of rust codespan
A Crystal-native port focused on faithful diagnostic behavior.
Architecture · Development · Guidelines · Testing · PR Workflow · Porting Parity
codespan transforms compiler errors into readable diagnostics - spanning code regions to provide context and clarity where it matters most. This Crystal port keeps the precision and clarity of rust-codespan while adapting implementation details to Crystal idioms. The goal is diagnostic output that feels native in Crystal but stays behaviorally anchored to the Rust reference.
Quick Start
- Install dependencies:
shards install
- Run specs:
crystal spec
Features
- Crystal shard scaffold ready for incremental rust-codespan parity porting.
- Dedicated
spec/suite for behavior verification. - Project docs and workflows aligned to parity-first development.
Installation
- Add the dependency to your
shard.yml:
dependencies:
codespan:
github: dsisnero/codespan
- Run
shards install.
Usage
require "codespan"
Development
shards install
crystal tool format --check src spec
ameba src spec
crystal spec
See Development Guide for full setup instructions.
Documentation
| Document | Purpose |
|---|---|
| Architecture | System design and data flow |
| Development | Setup and daily workflow |
| Coding Guidelines | Code style and conventions |
| Testing | Test commands and patterns |
| PR Workflow | Commits, PRs, and review process |
| Porting Parity | Upstream source pinning and parity tracking ledger |
Contributing
- Create an issue:
/forge-create-issue - Implement:
/forge-implement-issue <number> - Self-review:
/forge-reflect-pr - Address feedback:
/forge-address-pr-feedback - Update changelog:
/forge-update-changelog
Contributors
- Dominic Sisneros - creator and maintainer
codespan
- 0
- 0
- 0
- 0
- 3
- about 9 hours ago
- March 6, 2026
MIT License
Fri, 06 Mar 2026 19:52:30 GMT