Skip to content

Commit

Permalink
README: clippy-driver is not a replacement for rustc
Browse files Browse the repository at this point in the history
Currently, `clippy-driver` may run codegen, but this is an
implementation detail.

See rust-lang/rust-clippy#8035.

Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ojeda committed Jan 11, 2022
1 parent fccf07b commit fd97d79
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fd97d79

Please sign in to comment.