What problem does it solve?
Maintaining high code quality in a kernel project is crucial to prevent subtle bugs and ensure long-term maintainability. This Skill provides a pre-commit checklist and tools to enforce Breenix's strict coding standards, catching issues like compiler warnings, Clippy lints, and log side-effects before they enter the codebase.
Core Features & Use Cases
- Zero-Warning Builds: Ensure all compiler warnings are resolved before committing.
- Clippy Linting: Run project-specific Clippy checks to enforce coding style and catch common pitfalls.
- Log Side-Effect Detection: Prevent unintended function calls within log statements that could impact performance or behavior.
- Use Case: Before pushing your latest kernel changes, use this Skill to run a full code quality check. It will identify an unused variable, a Clippy warning about a redundant closure, and a
log::trace! statement with a side-effect, allowing you to fix these issues proactively and maintain a pristine codebase.
Quick Start
Build kernel and check for warnings
cd kernel
cargo build --target x86_64-unknown-none 2>&1 | grep warning
Run clippy with project-specific flags
cargo clippy --target x86_64-unknown-none
-- -Dclippy::debug_assert_with_mut_call
-Dclippy::print_stdout