Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

clippy-advanced

/clippy-advanced

Konfiguruje Clippy dla Rusta w szerszym zakresie: własne reguły, lints pedantic i nursery, clippy.toml oraz integracja z IDE i CI.

Repozytorium
claude-plugins ↗
Licencja
MIT
Ostatnia zmiana repozytorium
24.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
4
Przestarzałość

Brak sygnałów. Repozytorium zmienione 24.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Konfiguruje Clippy dla Rusta w szerszym zakresie: własne reguły, lints pedantic i nursery, clippy.toml oraz integracja z IDE i CI.

Oryginalny opis (EN)

Advanced Clippy configuration for Rust — custom rules, pedantic/nursery lints, clippy.toml, IDE and CI integration. Use when configuring or enforcing lint standards.

Jak działa

  1. When to Use This Skill
  2. Installation
  3. Basic Usage
  4. Lint Categories
  5. clippy.toml Essential Settings
  6. Lint Suppression
  7. Agentic Optimizations
  8. Quick Reference
  9. References
Sekcje z nagłówków SKILL.md, w oryginale · 168 linii, 640 słów
Podgląd SKILL.md
---
created: 2025-12-16
modified: 2026-05-09
reviewed: 2025-12-16
name: clippy-advanced
description: "Advanced Clippy configuration for Rust — custom rules, pedantic/nursery lints, clippy.toml, IDE and CI integration. Use when configuring or enforcing lint standards."
user-invocable: false
allowed-tools: Bash, Read, Grep, Glob
---

# clippy-advanced - Advanced Clippy Configuration

Advanced Clippy configuration for comprehensive Rust linting, including custom rules, lint categories, disallowed methods, and IDE integration.

## When to Use This Skill

| 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) |

## Installation

```bash
# Clippy is included with rustup
rustup component add clippy

# Verify installation
cargo clippy --version

# Update clippy with rust toolchain
rustup update
```

## Basic Usage

```bash
# 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
```

## Lint Categories

| 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 |

### Recommended Cargo.toml Configuration

```toml
[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"
```

## clippy.toml Essential Settings

Create `clippy.toml` in project root for thresholds and disallowed items:

```toml
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"]
```

## Lint Suppression

```rust
// 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;
```

## Agentic Optimizations

| 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` |

## Quick Reference

### Command-Line Flags

| 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 |

### Lint Levels

| Level | Attribute | Effect |
|-------|-----------|--------|
| Allow | `#[allow(...)]` | Suppress lint |
| Warn | `#[warn(...)]` | Show warning |
| Deny | `#[deny(...)]` | Compile error |

## References

- [Clippy documentation](https://doc.rust-lang.org/clippy/)
- [Lint list](https://rust-lang.github.io/rust-clippy/master/)
- [Configuration options](https://doc.rust-lang.org/clippy/configuration.html)
- [rust-analyzer integration](https://rust-analyzer.github.io/manual.html)

For detailed configuration examples, CI integration, IDE setup, and best practices, see [REFERENCE.md](REFERENCE.md).
Pliki w paczce (2)
  • REFERENCE.md 11 KB
  • SKILL.md 5 KB

Wersje

W bazie nie ma innych skilli o nazwie clippy-advanced.

Migawka bazy z 13.11.2026 · wersja paczki e2a0ce3d8e74 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100clippy-custom
    Pomaga tworzyć własne lints Clippy, implementować przebiegi lintów i wnosić wkład do Clippy dla standardów kodu Rust.
  • 100clippy-configuration
    Konfiguruje Clippy w projektach Rust przez plik TOML, grupy lintów, atrybuty i ustawienia workspace.
  • 95rust-idioms
    Stosuje idiomy Rusta: własność i borrow checker, błędy przez thiserror i anyhow, Tokio oraz zgodność z Clippy pedantic.
  • 100google-rust-style
    Stosuje przewodnik stylu Rust Google dla agentów: gotowe rustfmt.toml, clippy.toml i [lints] oraz reguły oceny, których żadne narzędzie nie sprawdza, jak układ modułów, importy, panic i nazewnictwo.
  • 100rust-style-clippy
    Stosuje i diagnozuje styl Rust: rustfmt, Clippy, komunikaty kompilatora, migracje edycji oraz mapowanie wytycznych API na linty.
  • 100rust-project-setup
    Prowadzi przy zakładaniu nowych projektów Rust: workspace wielu crate'ów, dobre praktyki Cargo.toml, potoki CI oraz konfiguracja clippy, rustfmt i lintów.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.