]> git.lizzy.rs Git - rust.git/blobdiff - README.md
Improve doc on how to add MSRV to a lint
[rust.git] / README.md
index 74719f02fe086a3fcadaa2bf5a0a36b3a71b1e26..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: