Skip to content

Commit 5f51eed

Browse files
committed
Update README.md
1 parent 605f132 commit 5f51eed

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,22 @@ Note that this is still experimental and only supported on the nightly channel:
8888
cargo clippy --fix -Z unstable-options
8989
```
9090

91+
#### Workspaces
92+
93+
All the usual workspace options should work with Clippy. For example the following command
94+
will run Clippy on the `example` crate:
95+
96+
```terminal
97+
cargo clippy -p example
98+
```
99+
100+
As with `cargo check`, this includes dependencies that are members of the workspace, like path dependencies.
101+
If you want to run Clippy **only** on the given crate, use the `--no-deps` option like this:
102+
103+
```terminal
104+
cargo clippy -p example -- --no-deps
105+
```
106+
91107
### Running Clippy from the command line without installing it
92108

93109
To have cargo compile your crate with Clippy without Clippy installation

0 commit comments

Comments
 (0)