Document extending list type configs

Signed-off-by: Tyler Weaver <maybe@tylerjw.dev>
This commit is contained in:
Tyler Weaver 2023-01-12 06:43:17 -07:00
parent 7c01721434
commit cfe8849a62
No known key found for this signature in database
2 changed files with 18 additions and 0 deletions

View File

@ -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.

View File

@ -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.