mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Document extending list type configs
Signed-off-by: Tyler Weaver <maybe@tylerjw.dev>
This commit is contained in:
parent
7c01721434
commit
cfe8849a62
@ -200,6 +200,15 @@ cognitive-complexity-threshold = 30
|
||||
See the [list of configurable lints](https://rust-lang.github.io/rust-clippy/master/index.html#Configuration),
|
||||
the lint descriptions contain the names and meanings of these configuration variables.
|
||||
|
||||
For configurations that are a list type with default values such as
|
||||
[disallowed-names](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names),
|
||||
you can use the unique value `".."` to extend the default values instead of replacing them.
|
||||
|
||||
```toml
|
||||
# default of disallowed-names is ["foo", "baz", "quux"]
|
||||
disallowed-names = ["bar", ".."] # -> ["bar", "foo", "baz", "quux"]
|
||||
```
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> `clippy.toml` or `.clippy.toml` cannot be used to allow/deny lints.
|
||||
|
@ -14,6 +14,15 @@ cognitive-complexity-threshold = 30
|
||||
See the [list of configurable lints](https://rust-lang.github.io/rust-clippy/master/index.html#Configuration),
|
||||
the lint descriptions contain the names and meanings of these configuration variables.
|
||||
|
||||
For configurations that are a list type with default values such as
|
||||
[disallowed-names](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names),
|
||||
you can use the unique value `".."` to extend the default values instead of replacing them.
|
||||
|
||||
```toml
|
||||
# default of disallowed-names is ["foo", "baz", "quux"]
|
||||
disallowed-names = ["bar", ".."] # -> ["bar", "foo", "baz", "quux"]
|
||||
```
|
||||
|
||||
To deactivate the "for further information visit *lint-link*" message you can define the `CLIPPY_DISABLE_DOCS_LINKS`
|
||||
environment variable.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user