Thanks for your interest in contributing! This document covers everything you need to get started.
-
Clone the repository
git clone https://github.com/helgesverre/sql-splitter.git cd sql-splitter -
Install Rust 1.70+
- All platforms: rustup.rs
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Build and test
cargo build --release cargo test
- Run
cargo fmtbefore committing - Run
cargo clippyto check for issues - Keep functions focused and small
- Add comments for non-obvious logic
AI coding assistants are encouraged for contributing to this project. Tools like Amp Code, Claude Code, Cursor, and similar assistants can significantly accelerate development.
AI-generated code must meet the same standards as human-written code:
- All tests must pass genuinely - Tests verify actual behavior, not just compile
- No stubbed tests - Never use
todo!(),unimplemented!(), or hardcoded expected values to make tests pass artificially - No skipped assertions - Every test must assert meaningful behavior
- Review critically - Understand and verify all generated code before committing
For new features or significant changes, follow this workflow:
- Check existing designs - Review
docs/features/for related design docs - Write a design doc - For new features, create
docs/features/FEATURE_NAME.md(seeSAMPLE_FEATURE.mdfor template) - Implement in phases - Break large features into phases as shown in the design doc
- Test thoroughly - Add tests that verify the design requirements
- Reference in PR - Link to the design doc in your pull request
When starting an AI session, consider which mode you're in:
| Mode | Purpose | Example |
|---|---|---|
| Build | New functionality | "Implement sample command (Phase 1)" |
| Improve | Refactor without changing behavior | "Extract sampler module" |
| Sweep | Fix related bugs | "Fix all INSERT parsing edge cases" |
This prevents scope creep and keeps AI contributions focused.
- Run all tests:
cargo test - Run with output:
cargo test -- --nocapture - Run benchmarks:
cargo bench
All PRs must pass tests. Add tests for new functionality.
# Run all benchmarks
cargo bench
# Run specific benchmark
cargo bench --bench parser
# With profiling (requires flamegraph)
cargo flamegraph --bench parser- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes
- Run tests and linting:
cargo fmt cargo clippy cargo test - Commit with a clear message
- Push and open a PR
- Describe what the PR does and why
- Keep changes focused (one feature/fix per PR)
- Update documentation if needed
- Add tests for new functionality
- Search existing issues first
- Include reproduction steps for bugs
- Include Rust version (
rustc --version) and OS - Be specific about expected vs actual behavior
Open an issue or start a discussion.