code-quality-check

Enforce pre-commit code quality checks for the Breenix kernel.

7|Updated Nov 21, 2015
One-click install
npx skills add https://github.com/ryanbreen/breenix --skill code-quality-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-quality-check
Source: https://github.com/ryanbreen/breenix/tree/main/breenix-code-quality-check
Command: npx skills add https://github.com/ryanbreen/breenix --skill code-quality-check

SYSTEM DOCUMENTATION & REQUIREMENTS

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

Frequently Asked Questions about code-quality-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent compiler warnings and Clippy lints from entering my Rust kernel codebase?

Pre-commit code quality checks catch compiler warnings, Clippy lints, and log side-effects before commits. Run `cargo build --target x86_64-unknown-none` and `cargo clippy --target x86_64-unknown-none` to enforce zero-warning builds and project-specific coding standards, maintaining code quality in kernel development workflows.

What checks should I run before committing kernel code changes?

Run a full code quality check: `cargo build --target x86_64-unknown-none` for compiler warnings, `cargo clippy --target x86_64-unknown-none` for linting, `cargo test` for correctness, and manual log-scan checks for side-effects. This identifies unused variables, redundant closures, and problematic log statements before they enter the codebase.

Can I detect log side-effects and dead code in Rust kernel projects?

Yes. Pre-commit checks scan for unintended function calls within log statements that impact performance and identify dead code. Use `#[allow(dead_code)]` explicitly for legitimate API items, with compliance verified against CLAUDE.md standards.

Does this work with custom Clippy rules and x86_64 kernel targets?

Yes. The Skill applies project-specific Clippy flags like `-Dclippy::debug_assert_with_mut_call` and `-Dclippy::print_stdout` with the `x86_64-unknown-none` target, enforcing coding standards tailored to Breenix kernel development across local workflows, pre-commit hooks, and CI pipelines.

What happens if I have legitimate dead code in my kernel API?

Mark legitimate API items with `#[allow(dead_code)]` and ensure compliance with CLAUDE.md. The pre-commit checks distinguish between dead code that should be removed and intentional public API that remains unused by current code.

Why run code quality checks before pushing kernel commits?

Pre-commit checks prevent subtle bugs and maintain long-term kernel maintainability by catching compiler warnings, Clippy violations, log side-effects, and dead code early. This ensures a pristine codebase and reduces debugging burden downstream.