]> git.lizzy.rs Git - rust.git/blobdiff - README.md
Auto merge of #6805 - matthiaskrgr:uca_nopub_6803, r=flip1995
[rust.git] / README.md
index a4928e17e6a947a3bbcb02a3e43ae9575ddc6cf8..63057609bb6fec5063ade880b9806a09fdfe42e5 100644 (file)
--- a/README.md
+++ b/README.md
@@ -98,6 +98,23 @@ 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`)
+
+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:
+
+```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.
+
 ### Travis CI
 
 You can add Clippy to Travis CI in the same way you use it locally:
@@ -185,7 +202,6 @@ the lint(s) you are interested in:
 ```terminal
 cargo clippy -- -A clippy::all -W clippy::useless_format -W clippy::...
 ```
-Note that if you've run clippy before, this may only take effect after you've modified a file or ran `cargo clean`.
 
 ### Specifying the minimum supported Rust version