mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Update README.md
This commit is contained in:
parent
0387981f2b
commit
192ccfb4ef
16
README.md
16
README.md
@ -82,6 +82,22 @@ Note that this is still experimental and only supported on the nightly channel:
|
|||||||
cargo clippy --fix -Z unstable-options
|
cargo clippy --fix -Z unstable-options
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Workspaces
|
||||||
|
|
||||||
|
All the usual workspace options should work with Clippy. For example the following command
|
||||||
|
will run Clippy on the `example` crate:
|
||||||
|
|
||||||
|
```terminal
|
||||||
|
cargo clippy -p example
|
||||||
|
```
|
||||||
|
|
||||||
|
As with `cargo check`, this includes dependencies that are members of the workspace, like path dependencies.
|
||||||
|
If you want to run Clippy **only** on the given crate, use the `--no-deps` option like this:
|
||||||
|
|
||||||
|
```terminal
|
||||||
|
cargo clippy -p example -- --no-deps
|
||||||
|
```
|
||||||
|
|
||||||
### Running Clippy from the command line without installing it
|
### Running Clippy from the command line without installing it
|
||||||
|
|
||||||
To have cargo compile your crate with Clippy without Clippy installation
|
To have cargo compile your crate with Clippy without Clippy installation
|
||||||
|
Loading…
Reference in New Issue
Block a user