Skip to content

Commit dfbc926

Browse files
bors[bot]waynr
andcommitted
Merge #3443
3443: Document how to lint local Clippy changes with locally built Clippy r=flip1995 a=waynr Co-authored-by: Wayne Warren <[email protected]>
2 parents 70ca052 + 4450b3e commit dfbc926

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CONTRIBUTING.md

+12
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ Manually testing against an example file is useful if you have added some
152152
local modifications, run `env CLIPPY_TESTS=true cargo run --bin clippy-driver -- -L ./target/debug input.rs`
153153
from the working copy root.
154154

155+
### Linting Clippy with your changes locally
156+
157+
Clippy CI only passes if all lints defined in the version of the Clippy being
158+
tested pass (that is, don’t report any suggestions). You can avoid prolonging
159+
the CI feedback cycle for PRs you submit by running these lints yourself ahead
160+
of time and addressing any issues found:
161+
162+
```
163+
cargo build
164+
`pwd`/target/debug/cargo-clippy clippy --all-targets --all-features -- -D clippy::all -D clippy::internal -D clippy::pedantic
165+
```
166+
155167
### How Clippy works
156168

157169
Clippy is a [rustc compiler plugin][compiler_plugin]. The main entry point is at [`src/lib.rs`][main_entry]. In there, the lint registration is delegated to the [`clippy_lints`][lint_crate] crate.

0 commit comments

Comments
 (0)