lint

Run cargo fmt and cargo clippy to enforce Rust formatting and linting.

6|2|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/nikuscs/olx-tracker --skill lint-nikuscs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lint
Source: https://github.com/nikuscs/olx-tracker/tree/main/.claude/skills/lint
Command: npx skills add https://github.com/nikuscs/olx-tracker --skill lint-nikuscs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rust projects often suffer from formatting drift and lint violations that slow reviews and CI. This Skill automates code quality checks by running cargo fmt for formatting and cargo clippy for linting, enabling pedantic rules and enforcing a 100-character line width to maintain consistency. It also enforces no unsafe code usage (unsafe_code = "forbid") to improve safety and reliability.

Core Features & Use Cases

  • Automated formatting checks and fixes with cargo fmt
  • Lint enforcement with cargo clippy (all-targets) and optional fixes
  • Safety enforcement (no unsafe code) and 100-character line width
  • Suitable for pre-commit hooks, CI pipelines, and code reviews

Quick Start

Run cargo fmt --check to verify formatting, then cargo fmt to apply formatting, followed by cargo clippy --all-targets to lint, and cargo clippy --fix to auto-fix issues where possible.

Frequently Asked Questions about lint

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

FAQPage Schema
How do I automate Rust code formatting and linting checks in CI?

Automate Rust code formatting and linting by running cargo fmt to apply formatting and cargo clippy --all-targets to enforce lint rules. This ensures consistent code quality and catches violations early in CI pipelines or pre-commit hooks.

Can I auto-fix Rust clippy lint violations?

Yes, you can auto-fix Rust clippy lint violations by running cargo clippy --fix. This command automatically corrects issues where possible, streamlining the code review process and reducing manual formatting drift.

What is the best way to enforce a 100-character line width in Rust projects?

Enforce a 100-character line width in Rust projects by applying cargo fmt with specific configuration rules. This standardizes code formatting across the project, preventing formatting drift and maintaining consistency.

Does this Rust linting workflow allow unsafe code?

This Rust linting workflow forbids unsafe code by setting unsafe_code = "forbid". This strict safety constraint improves reliability and prevents potential memory safety issues during code quality checks.

How do I check Rust code formatting without modifying files?

Check Rust code formatting without modifying files by running cargo fmt --check. This verifies that the codebase adheres to the specified formatting rules, making it ideal for CI pipelines and pre-commit hooks.

What are pedantic clippy lints and how do they improve Rust code quality?

Pedantic clippy lints are strict, opinionated rules enforced via cargo clippy to identify subtle code quality issues. Applying them catches potential bugs and enforces idiomatic Rust patterns, resulting in cleaner and more consistent code.