diff options
| author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-11-21 14:11:24 +0000 |
|---|---|---|
| committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-11-21 14:11:24 +0000 |
| commit | dfbc926b704b40011dfd3abe2a29665993a969ac (patch) | |
| tree | cdd7c1aa9313aa8ebe69e80d3195470608725fab | |
| parent | 70ca0523975596409210e0bf41d21bc48a54d4ec (diff) | |
| parent | 4450b3e47a33e13b890e7e5b41084c89148fae72 (diff) | |
| download | rust-dfbc926b704b40011dfd3abe2a29665993a969ac.tar.gz rust-dfbc926b704b40011dfd3abe2a29665993a969ac.zip | |
Merge #3443
3443: Document how to lint local Clippy changes with locally built Clippy r=flip1995 a=waynr Co-authored-by: Wayne Warren <wayne.warren.s@gmail.com>
| -rw-r--r-- | CONTRIBUTING.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 50f61eb1e67..bb0da592851 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -152,6 +152,18 @@ Manually testing against an example file is useful if you have added some local modifications, run `env CLIPPY_TESTS=true cargo run --bin clippy-driver -- -L ./target/debug input.rs` from the working copy root. +### Linting Clippy with your changes locally + +Clippy CI only passes if all lints defined in the version of the Clippy being +tested pass (that is, don’t report any suggestions). You can avoid prolonging +the CI feedback cycle for PRs you submit by running these lints yourself ahead +of time and addressing any issues found: + +``` +cargo build +`pwd`/target/debug/cargo-clippy clippy --all-targets --all-features -- -D clippy::all -D clippy::internal -D clippy::pedantic +``` + ### How Clippy works 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. |
