Help us improve
Share bugs, ideas, or general feedback.
From rust-plugin
Configures advanced Clippy linting for Rust projects with custom rules, categories, clippy.toml, Cargo.toml lints, and CI enforcement for code standards.
npx claudepluginhub laurigates/claude-plugins --plugin rust-pluginHow this skill is triggered — by the user, by Claude, or both
Slash command
/rust-plugin:clippy-advancedhaikuThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Advanced Clippy configuration for comprehensive Rust linting, including custom rules, lint categories, disallowed methods, and IDE integration.
Applies Clippy lint categories for Rust code including correctness, performance, style, and custom lint configuration. Useful for Rust code quality checks.
Configures modern linting: Biome for JavaScript/TypeScript, Ruff for Python, Clippy for Rust. Detects projects, migrates from ESLint/Flake8, checks versions, adds pre-commit integration.
Provides Rust coding conventions on imports (prefer full paths over use), crate:: references, and cargo clippy checks for writing and reviewing Rust code.
Share bugs, ideas, or general feedback.
Advanced Clippy configuration for comprehensive Rust linting, including custom rules, lint categories, disallowed methods, and IDE integration.
| Use this skill when... | Use another tool instead when... |
|---|---|
| Configuring Clippy lint rules | Formatting code (use rustfmt) |
| Setting up CI linting for Rust | Building/compiling (use cargo build) |
| Customizing clippy.toml | Running tests (use cargo test) |
| Enforcing code standards | Managing dependencies (use cargo add) |
# Clippy is included with rustup
rustup component add clippy
# Verify installation
cargo clippy --version
# Update clippy with rust toolchain
rustup update
# Run clippy on current project
cargo clippy
# Run on all targets (lib, bins, tests, examples, benches)
cargo clippy --all-targets
# Run with all features enabled
cargo clippy --all-features
# Run on workspace
cargo clippy --workspace --all-targets --all-features
# Show detailed lint explanations
cargo clippy -- -W clippy::all -A clippy::pedantic
# Treat warnings as errors
cargo clippy -- -D warnings
| Category | Purpose | Default |
|---|---|---|
clippy::correctness | Likely bugs | Deny |
clippy::complexity | Overly complex code | Warn |
clippy::perf | Performance issues | Warn |
clippy::style | Code style | Warn |
clippy::suspicious | Code that looks wrong | Warn |
clippy::pedantic | Opinionated style | Off |
clippy::restriction | Opt-in constraints | Off |
clippy::nursery | Experimental | Off |
clippy::cargo | Cargo.toml issues | Off |
[workspace.lints.clippy]
# Deny correctness issues (likely bugs)
correctness = "deny"
complexity = "warn"
perf = "warn"
style = "warn"
suspicious = "warn"
# Enable pedantic but allow some noisy lints
pedantic = "warn"
must_use_candidate = "allow"
missing_errors_doc = "allow"
# Enable some restriction lints selectively
clone_on_ref_ptr = "warn"
dbg_macro = "warn"
print_stdout = "warn"
todo = "warn"
unimplemented = "warn"
unwrap_used = "warn"
# Enable nursery lints (experimental)
use_self = "warn"
Create clippy.toml in project root for thresholds and disallowed items:
cognitive-complexity-threshold = 15
too-many-lines-threshold = 100
too-many-arguments-threshold = 5
disallowed-methods = [
{ path = "std::env::var", reason = "Use std::env::var_os for better Unicode handling" },
{ path = "std::process::exit", reason = "Use Result propagation instead" },
]
disallowed-names = ["foo", "bar", "baz"]
// Function-level
#[allow(clippy::too_many_arguments)]
fn complex_function(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32) {}
// Module-level (src/lib.rs)
#![warn(clippy::all)]
#![warn(clippy::pedantic)]
#![deny(clippy::unwrap_used)]
#![allow(clippy::module_name_repetitions)]
// Inline
#[allow(clippy::cast_possible_truncation)]
let x = value as u8;
| Context | Command |
|---|---|
| CI strict | cargo clippy --workspace --all-targets -- -D warnings |
| JSON output | cargo clippy --message-format=json |
| Compact errors | cargo clippy --message-format=short |
| Quick check | cargo clippy --message-format=short -- -D warnings |
| Pedantic check | cargo clippy -- -W clippy::pedantic -D clippy::correctness |
| Flag | Description |
|---|---|
--all-targets | Check lib, bins, tests, examples, benches |
--all-features | Enable all features |
--workspace | Check entire workspace |
--message-format=json | JSON output for tooling |
--message-format=short | Compact error format |
-- -D warnings | Treat warnings as errors |
-- -W clippy::pedantic | Enable pedantic lints |
-- -A clippy::lint_name | Allow specific lint |
| Level | Attribute | Effect |
|---|---|---|
| Allow | #[allow(...)] | Suppress lint |
| Warn | #[warn(...)] | Show warning |
| Deny | #[deny(...)] | Compile error |
For detailed configuration examples, CI integration, IDE setup, and best practices, see REFERENCE.md.