Code Check and Lint Skill
Check Rust code compilation and run clippy linter.
Commands
Check all Rust code compiles:
bash
just check-rs
Alias: just check
Check specific crate:
bash
just check-crate <crate-name>
Lint all Rust code:
bash
just clippy
Lint specific crate:
bash
just clippy-crate <crate-name>
Checking with Features
Many crates have optional features (like ffi for FFI bindings) that should be checked.
Check with FFI feature:
bash
just check-rs --features ffi just clippy --features ffi
Check with all features:
bash
just check-rs --all-features just clippy --all-features
Per-crate feature checks:
bash
just check-crate <crate-name> --features ffi just clippy-crate <crate-name> --all-features
Workflow
- •Format code →
/format - •Check crate compilation →
just check-crate <crate-name> - •Lint crate with clippy →
just clippy-crate <crate-name> - •Fix all warnings, repeat 2-3 until crate is clean
- •Check whole project →
just check-rs - •Lint whole project →
just clippy - •Fix any remaining warnings
- •Check with FFI features →
just check-rs --features ffiandjust clippy --features ffi - •Check with all features →
just check-rs --all-featuresandjust clippy --all-features - •Fix any feature-specific warnings
Error Handling
- •Compilation errors → Fix reported issues, format, re-check
- •Clippy warnings → Fix all warnings (mandatory), format, re-run
Critical Rules
- •NEVER use
cargo checkorcargo clippydirectly - usejustcommands - •FIX ALL WARNINGS - warnings are not acceptable
- •Format before checking - run
/formatfirst
Related Skills
- •
/format- Format code before running checks - •
/build- Build targets after validation passes