Skip to content

Commit 4a76b6f

Browse files
committed
Add the warning to all documentation.
1 parent 7a870ae commit 4a76b6f

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ cargo clippy
9191

9292
#### Automatically applying Clippy suggestions
9393

94-
Clippy can automatically apply some lint suggestions, just like the compiler.
94+
Clippy can automatically apply some lint suggestions, just like the compiler. Note that `--fix` implies
95+
`--all-targets`, so it can fix as much code as it can.
9596

9697
```terminal
9798
cargo clippy --fix

book/src/usage.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ fn main() {
111111

112112
### Automatically applying Clippy suggestions
113113

114-
Clippy can automatically apply some lint suggestions, just like the compiler.
114+
Clippy can automatically apply some lint suggestions, just like the compiler. Note that `--fix` implies
115+
`--all-targets`, so it can fix as much code as it can.
115116

116117
```terminal
117118
cargo clippy --fix

lintcheck/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ is explicitly specified in the options.
7979

8080
### Fix mode
8181
You can run `cargo lintcheck --fix` which will run Clippy with `--fix` and
82-
print a warning if Clippy's suggestions fail to apply (if the resulting code does not build).
82+
print a warning if Clippy's suggestions fail to apply (if the resulting code does not build).
8383
This lets us spot bad suggestions or false positives automatically in some cases.
8484

85+
> Note: Fix mode implies `--all-targets`, so it can fix as much code as it can.
86+
8587
Please note that the target dir should be cleaned afterwards since clippy will modify
8688
the downloaded sources which can lead to unexpected results when running lintcheck again afterwards.
8789

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Usage:
1313
1414
Common options:
1515
--no-deps Run Clippy only on the given crate, without linting the dependencies
16-
--fix Automatically apply lint suggestions. This flag implies `--no-deps`
16+
--fix Automatically apply lint suggestions. This flag implies `--no-deps` and `--all-targets`
1717
-h, --help Print this message
1818
-V, --version Print version info and exit
1919
--explain LINT Print the documentation for a given lint

0 commit comments

Comments
 (0)