This guide covers day-to-day development practices for sqlchisel.
- Install Rust (stable) and ensure
cargois on your PATH. - Clone the repo and run
cargo buildonce to fetch dependencies.
- Format:
cargo fmt - Lint:
cargo clippy --all-targets --all-features -- -D warnings - Tests:
cargo test - CI equivalent locally: run all three commands above.
- Align docs when behavior changes:
README.md(user-facing quickstart)docs/format-contract.md(stable behavior)docs/style-guide.md(heuristics/taste)docs/dremio.md(dialect-specific behavior)
- Keep
docs/repo-cleanup-checklist.mdupdated while the docs/module split effort is in progress. - Prefer using
--format,--check, or--writelocally to mirror user workflows. - For Dremio work, add parser + formatter coverage and tests together.
- For Dremio syntax additions, update all four together:
fixtures/dremio/reference-commands/- parser tests (
src/parser.rs) - formatter tests (
src/format/sql/mod.rs) docs/dremio-support-matrix.md
- Rust edition 2021.
- Avoid non-ASCII unless the file already uses it or it is required.
- Keep code comments concise; favor clear code and targeted comments for tricky bits.
- Ensure
cargo fmt,cargo clippy --all-targets --all-features -- -D warnings, andcargo testall pass. - Include tests for new behavior (parser/formatter).
- Update docs as needed (
README.mdand relevant files indocs/).