rust/book/src/development
Philipp Krones e9aed8764e
set concurrency for the deploy job (#14448)
In the current GitHub Actions CI/CD setup, the `deploy` job is not
triggered when a PR is enqueued in the merge queue but only when it is
merged. Since concurrency is not configured for this job, deployments
may fail for later PRs if multiple PRs are merged in quick succession.
(e.g. the deployment for [this
commit](c418714518)
was successful, but the deployment for [this
commit](0a141ab7b8)
that was pushed to `main` immediately afterward failed. (edit: the
latter deployment seems to be rerun))

changelog: none

r? flip1995
2025-03-23 12:15:07 +00:00
..
infrastructure set concurrency for the deploy job (#14448) 2025-03-23 12:15:07 +00:00
proposals Merge commit '3e5a02b13b' into clippy-subtree-update 2024-06-13 12:30:48 +02:00
adding_lints.md Mention about .fixed files 2025-03-17 17:55:26 +05:30
basics.md rename rust-toolchain to rust-toolchain.toml 2025-03-21 09:37:59 +09:00
common_tools_writing_lints.md Convert two rustc_middle::lint functions to Span methods. 2025-02-02 13:57:34 +11:00
defining_lints.md Merge commit '51d49c1ae2' into clippy-subtree-update 2025-01-28 19:33:54 +01:00
emitting_lints.md Merge commit '10136170fe' into clippy-subtree-update 2024-02-27 15:50:17 +01:00
lint_passes.md Merge commit '9725c4a162' into clippy-subtree-update 2024-04-04 19:52:55 +02:00
macro_expansions.md explain is_from_proc_macro in the book 2025-03-12 18:25:25 +01:00
method_checking.md Merge commit '19e305bb57' into clippy-subtree-update 2025-01-09 18:57:00 +01:00
README.md Merge commit 'f712eb5cdc' into clippy-subtree-update 2024-11-07 22:37:01 +01:00
speedtest.md Merge commit '080b587854' into clippyup 2023-08-24 21:32:12 +02:00
the_team.md Remove @xFrednet from docs 👋 2025-03-16 15:19:49 +01:00
trait_checking.md Merge commit '93f0a9a91f' into clippy-subtree-update 2024-03-07 17:19:29 +01:00
type_checking.md Merge commit '609cd310be' into clippy-subtree-update 2024-12-26 15:15:54 +01:00
writing_tests.md Add comment annotations 2025-03-16 18:52:35 +05:30

Clippy Development

Hello fellow Rustacean! If you made it here, you're probably interested in making Clippy better by contributing to it. In that case, welcome to the project!

Note: If you're just interested in using Clippy, there's nothing to see from this point onward, and you should return to one of the earlier chapters.

Getting started

If this is your first time contributing to Clippy, you should first read the Basics docs. This will explain the basics on how to get the source code and how to compile and test the code.

Additional Readings for Beginners

If a dear reader of this documentation has never taken a class on compilers and interpreters, it might be confusing as to why AST level deals with only the language's syntax. And some readers might not even understand what lexing, parsing, and AST mean.

This documentation serves by no means as a crash course on compilers or language design. And for details specifically related to Rust, the Rustc Development Guide is a far better choice to peruse.

The Syntax and AST chapter and the High-Level IR chapter are great introduction to the concepts mentioned in this chapter.

Some readers might also find the introductory chapter of Robert Nystrom's Crafting Interpreters a helpful overview of compiled and interpreted languages before jumping back to the Rustc guide.

Writing code

If you have done the basic setup, it's time to start hacking.

The Adding lints chapter is a walk through on how to add a new lint to Clippy. This is also interesting if you just want to fix a lint, because it also covers how to test lints and gives an overview of the bigger picture.

If you want to add a new lint or change existing ones apart from bugfixing, it's also a good idea to give the stability guarantees and lint categories sections of the Clippy 1.0 RFC a quick read. The lint categories are also described earlier in this book.

Note: Some higher level things about contributing to Clippy are still covered in the CONTRIBUTING.md document. Some of those will be moved to the book over time, like:

  • Finding something to fix
  • IDE setup
  • High level overview on how Clippy works
  • Triage procedure