mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
add cargo.toml lint section way of adding lints
This commit is contained in:
parent
a2c1d565e5
commit
80bafa5d45
1 changed files with 9 additions and 0 deletions
|
@ -79,6 +79,15 @@ interested in:
|
|||
cargo clippy -- -A clippy::all -W clippy::useless_format -W clippy::...
|
||||
```
|
||||
|
||||
The last way to allow/disallow lints is to use `Cargo.toml` using [the lints section](https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-lints-section)):
|
||||
|
||||
To deny `clippy::enum_glob_use`
|
||||
|
||||
```toml
|
||||
[lints.clippy]
|
||||
enum_glob_use = "deny"
|
||||
```
|
||||
|
||||
### Specifying the minimum supported Rust version
|
||||
|
||||
Projects that intend to support old versions of Rust can disable lints pertaining to newer features by specifying the
|
||||
|
|
Loading…
Reference in a new issue