@@ -169,12 +169,33 @@ You can add options to your code to `allow`/`warn`/`deny` Clippy lints:
169169
170170Note: ` deny ` produces errors instead of warnings.
171171
172- If you do not want to include your lint levels in your code, you can globally enable/disable lints by passing extra
173- flags to Clippy during the run: ` cargo clippy -- -A clippy::lint_name ` will run Clippy with ` lint_name ` disabled and
174- ` cargo clippy -- -W clippy::lint_name ` will run it with that enabled. This also works with lint groups. For example you
175- can run Clippy with warnings for all lints enabled: ` cargo clippy -- -W clippy::pedantic `
172+ If you do not want to include your lint levels in your code, you can globally enable/disable lints
173+ by passing extra flags to Clippy during the run:
174+
175+ To disable ` lint_name ` , run
176+
177+ ``` terminal
178+ cargo clippy -- -A clippy::lint_name
179+ ```
180+
181+ And to enable ` lint_name ` , run
182+
183+ ``` terminal
184+ cargo clippy -- -W clippy::lint_name
185+ ```
186+
187+ This also works with lint groups. For example you
188+ can run Clippy with warnings for all lints enabled:
189+ ``` terminal
190+ cargo clippy -- -W clippy::pedantic
191+ ```
192+
176193If you care only about a single lint, you can allow all others and then explicitly reenable
177- the lint(s) you are interested in: ` cargo clippy -- -Aclippy::all -Wclippy::useless_format -Wclippy::... `
194+ the lint(s) you are interested in:
195+ ``` terminal
196+ cargo clippy -- -A clippy::all -W clippy::useless_format -W clippy::...
197+ ```
198+ Note that if you've run clippy before, this may only take effect after you've modified a file or ran ` cargo clean ` .
178199
179200## Contributing
180201
0 commit comments