lint

Run cargo fmt and cargo clippy checks on Rust workspaces.

77|10|Updated Feb 1, 2025
One-click install
npx skills add https://github.com/ahtavarasmus/lightfriend --skill lint-ahtavarasmus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lint
Source: https://github.com/ahtavarasmus/lightfriend/tree/main/.claude/skills/lint
Command: npx skills add https://github.com/ahtavarasmus/lightfriend --skill lint-ahtavarasmus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates code quality checks for Rust projects by running formatting and linting tasks to catch style inconsistencies and potential issues before commit.

Core Features & Use Cases

  • Formatting verification with cargo fmt --check to ensure code is clean and consistently formatted.
  • Lint verification with cargo clippy --workspace to identify and fix potential errors and suboptimal patterns.
  • Quick-start scenario: Imagine you want to ensure a clean build in CI by validating formatting and lint across the workspace before merging.

Quick Start

Run formatting and lint checks on the repository to verify code quality before commit.

Frequently Asked Questions about lint

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

FAQPage Schema
How do I run Rust formatting and lint checks across an entire workspace?

Run Rust formatting and lint checks across a workspace by coordinating cargo fmt --check for style verification and cargo clippy --workspace to identify suboptimal patterns, ensuring consistency before commit.

What is the best way to automate cargo clippy and cargo fmt checks in CI?

Automate cargo clippy and cargo fmt checks in CI by running deterministic tooling checks across the workspace, providing clear pass or fail reporting and auto-fix guidance to prevent regressions before merging.

How does cargo clippy identify and fix potential errors in a Rust codebase?

Cargo clippy identifies and fixes potential errors in a Rust codebase by analyzing the workspace for suboptimal patterns, enabling targeted auto-fix options with safety summaries to resolve issues efficiently.

Can I use cargo fmt to verify code formatting without modifying files?

You can use cargo fmt to verify code formatting without modifying files by running cargo fmt --check, which enforces consistent formatting standards across the repository and reports discrepancies clearly.

Why do I need both cargo fmt and cargo clippy for Rust code quality?

You need both cargo fmt and cargo clippy for Rust code quality because fmt enforces structural formatting consistency while clippy identifies deeper suboptimal patterns, together preventing style and logic regressions.