]> git.lizzy.rs Git - rust.git/blobdiff - README.md
lintcheck: fix --fix and document it in the readme.
[rust.git] / README.md
index 65e0864be904ce36f19edd5d0c1f0d646f96e887..63057609bb6fec5063ade880b9806a09fdfe42e5 100644 (file)
--- a/README.md
+++ b/README.md
@@ -98,16 +98,22 @@ If you want to run Clippy **only** on the given crate, use the `--no-deps` optio
 cargo clippy -p example -- --no-deps 
 ```
 
-### Running Clippy from the command line without installing it
+### As a rustc replacement (`clippy-driver`)
 
-To have cargo compile your crate with Clippy without Clippy installation
-in your code, you can use:
+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
-cargo run --bin cargo-clippy --manifest-path=path_to_clippys_Cargo.toml
+rustc --edition 2018 -Cpanic=abort foo.rs
 ```
 
-*Note:* Be sure that Clippy was compiled with the same version of rustc that cargo invokes here!
+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