Write Rust lints without forking Clippy | Trail of Bits Blog
This blog post introduces Dylint, a tool for loading Rust linting rules (or “lints”) from dynamic libraries. Dylint makes it easy for developers to maintain their own personal lint collections. Previously, the simplest way to write a new Rust lint was to fork Clippy, Rust’s de facto linting tool. But this approach has drawbacks in how one runs and maintains new lints. Dylint minimizes these distractions so that developers can focus on actually writing lints. First, we’ll go over the current state of Rust linting and the workings of Clippy. Then, we’ll explain how Dylint improves upon the status quo and offer some tips on how to begin using it. Skip to the last section, If you want to get straight to writing lints. Tools like Clippy take advantage of the Rust compiler’s dedicated support for linting. A Rust linter’s core component, called a “driver,” links against an appropriately named library, rustc_driver. By doing so, the driver essentially becomes a wrapper around the Rust compiler
Page content Originally published May 20, 2021 This blog post introduces Dylint , a tool for loading Rust linting rules (or “lints”) from dynamic libraries. Dylint makes it easy for developers to maintain their own personal lint collections. Previously, the simplest way to write a new Rust lint was to fork Clippy , Rust’s de facto linting tool. But this approach has drawbacks in how one runs and maintains new lints. Dylint minimizes these distractions so that developers can focus on actually writing lints. First, we’ll go over the current state of Rust linting and the workings of Clippy. Then,
Explore this link on the map →related reading
- A half-hour to learn Rustfasterthanli.me
- Rewriting Bun in Rust | Bun Blogbun.com
- What Is Linting + When to Use Lint Tools | Perforce Softwareperforce.com
- Best practices for Claude Code - Claude Code Docsanthropic.com
- Patterns for Defensive Programming in Rust | corrode Rust Consultingcorrode.dev
- What is Ownership? - The Rust Programming Languagedoc.rust-lang.org
- Rust Language Cheat Sheetcheats.rs
- GitHub - ultraworkers/claw-code: An agent-managed museum exhibit, built in Rust with Gajae-Code / LazyCodex — developed and maintained with no human intervention. · GitHubgithub.com
- Ralph Wiggum as a "software engineer"ghuntley.com
- First thoughts on Rust vs OCamlblog.darklang.com
- Pyrefly vs. ty: Comparing Python’s Two New Rust-Based Type Checkers | Edward Li's Blogblog.edward-li.com
- Could we have Rust without provenance? · Issue #287 · rust-lang/unsafe-code-guidelines · GitHubgithub.com