mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
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 <ojeda@kernel.org>
This commit is contained in:
parent
fccf07bae5
commit
fd97d792f9
1 changed files with 6 additions and 10 deletions
16
README.md
16
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue