rust-lang / rust-lang/rust-clippy

Coccinelle files generated by Clippy?

Open
#13,516 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-ui
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

An idea is to add a switch to Clippy to make it generate a Coccinelle file that fixes a good part of the problems that Clippy has found in a source file.

Info about the Coccinelle tool for Rust:

https://gitlab.inria.fr/coccinelle/coccinelleforrust/

https://docs.kernel.org/dev-tools/coccinelle.html

https://lwn.net/SubscriberLink/991399/8bfb2ec24205dbaa/

https://kangrejos.com/2024/Coccinelle%20for%20Rust.pdf

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Clippy's lint output and the linked Coccinelle for Rust documentation to determine how the tools could interact. Define the switch, the supported findings, and the generated Coccinelle file format; done means Clippy can generate an actionable file for a documented subset of its findings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.