From fd97d792f952618ee5f64e6e25cb8841742a9f4f Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Sat, 27 Nov 2021 17:10:19 +0100 Subject: [PATCH 1/2] `README`: `clippy-driver` is not a replacement for `rustc` Currently, `clippy-driver` may run codegen, but this is an implementation detail. See https://github.com/rust-lang/rust-clippy/issues/8035. Signed-off-by: Miguel Ojeda --- README.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1bbd89e7822e..f603b16d1a92 100644 --- a/README.md +++ b/README.md @@ -98,22 +98,18 @@ If you want to run Clippy **only** on the given crate, use the `--no-deps` optio cargo clippy -p example -- --no-deps ``` -### As a rustc replacement (`clippy-driver`) +### Using `clippy-driver` -Clippy can also be used in projects that do not use cargo. To do so, you will need to replace -your `rustc` compilation commands with `clippy-driver`. For example, if your project runs: - -```terminal -rustc --edition 2018 -Cpanic=abort foo.rs -``` - -Then, to enable Clippy, you will need to call: +Clippy can also be used in projects that do not use cargo. To do so, run `clippy-driver` +with the same arguments you use for `rustc`. For example: ```terminal clippy-driver --edition 2018 -Cpanic=abort foo.rs ``` -Note that `rustc` will still run, i.e. it will still emit the output files it normally does. +Note that `clippy-driver` is designed for running Clippy only and should not be used as a general +replacement for `rustc`. `clippy-driver` may produce artifacts that are not optimized as expected, +for example. ### Travis CI From 3d4fdedd7ee52ad660ccc0f9f713aeac9b21b8d0 Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Tue, 14 Dec 2021 18:13:14 +0100 Subject: [PATCH 2/2] `README`: mention `clippy-driver` on usage list Removes the "compiled from source" bit, which is confusing. Signed-off-by: Miguel Ojeda --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f603b16d1a92..ffdc636cadf2 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ Table of contents: ## Usage -Below are instructions on how to use Clippy as a subcommand, compiled from source -or in Travis CI. +Below are instructions on how to use Clippy as a cargo subcommand, +in projects that do not use cargo, or in Travis CI. ### As a cargo subcommand (`cargo clippy`)