File tree 1 file changed +25
-5
lines changed 1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -169,12 +169,32 @@ You can add options to your code to `allow`/`warn`/`deny` Clippy lints:
169
169
170
170
Note: ` deny ` produces errors instead of warnings.
171
171
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 by passing extra flags to Clippy during the run:
173
+
174
+ To disable ` lint_name ` , run
175
+
176
+ ``` terminal
177
+ cargo clippy -- -A clippy::lint_name
178
+ ```
179
+
180
+ And to enable ` lint_name ` , run
181
+
182
+ ``` terminal
183
+ cargo clippy -- -W clippy::lint_name
184
+ ```
185
+
186
+ This also works with lint groups. For example you
187
+ can run Clippy with warnings for all lints enabled:
188
+ ``` terminal
189
+ cargo clippy -- -W clippy::pedantic
190
+ ```
191
+
176
192
If 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::... `
193
+ the lint(s) you are interested in:
194
+ ``` terminal
195
+ cargo clippy -- -A clippy::all -W clippy::useless_format -W clippy::...
196
+ ```
197
+ Note that if you've run clippy before, this may only take effect after you've modified a file or ran ` cargo clean ` .
178
198
179
199
## Contributing
180
200
You can’t perform that action at this time.
0 commit comments