Pre-Push CI Checklist
Run these commands locally before pushing to ensure CI passes.
The Checklist
1
2
3
4
5
6
7
8
9
10
11
# 1. Format check (CI fails if not formatted)
cargo +nightly fmt --check
# 2. Compilation check (warnings = errors)
RUSTFLAGS="-D warnings" cargo check
# 3. Linting (warnings = errors)
cargo clippy -- -D warnings
# 4. Tests (warnings = errors, requires docling)
RUSTFLAGS="-D warnings" cargo test
One-Liner
1
2
3
4
cargo +nightly fmt --check && \
RUSTFLAGS="-D warnings" cargo check && \
cargo clippy -- -D warnings && \
RUSTFLAGS="-D warnings" cargo test
Why Each Step
- Format check - Ensures consistent code style (uses nightly rustfmt for
imports_granularity) - Compilation - Catches compile errors and warnings
- Clippy - Catches common mistakes and anti-patterns
- Tests - Validates functionality (requires
pip install docling)
If Checks Fail
Format
1
cargo +nightly fmt
Warnings
Fix warnings shown by cargo check or cargo clippy.
Tests
1
2
cargo test -- --nocapture # See test output
cargo test test_name # Run specific test
Nightly Requirement
Why +nightly? Project uses imports_granularity in rustfmt.toml (nightly-only feature).
Install: rustup toolchain install nightly