File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,26 @@ If you want to run Clippy **only** on the given crate, use the `--no-deps` optio
98
98
cargo clippy -p example -- --no-deps
99
99
```
100
100
101
+ ### As a rustc replacement (` clippy-driver ` )
102
+
103
+ Clippy can also be used in projects that do not use cargo. To do so, you will need to replace
104
+ your ` rustc ` compilation commands with ` clippy-driver ` . For example, if your project runs:
105
+
106
+ ``` terminal
107
+ rustc --edition 2018 -Cpanic=abort foo.rs
108
+ ```
109
+
110
+ Then, to enable Clippy, you will need to call:
111
+
112
+ ``` terminal
113
+ clippy-driver --edition 2018 -Cpanic=abort foo.rs
114
+ ```
115
+
116
+ Note that ` rustc ` will still run, i.e. it will still emit the output files it normally does.
117
+
118
+ You may notice that keeping ` rustc ` as the second argument (i.e. wrapping ` rustc ` by prepending
119
+ ` clippy-driver ` ) also works; however, the preferred way is to * not* wrap it.
120
+
101
121
### Travis CI
102
122
103
123
You can add Clippy to Travis CI in the same way you use it locally:
You can’t perform that action at this time.
0 commit comments