diff options
| author | Tyler Weaver <maybe@tylerjw.dev> | 2023-01-12 06:43:17 -0700 |
|---|---|---|
| committer | Tyler Weaver <maybe@tylerjw.dev> | 2023-01-12 06:51:58 -0700 |
| commit | cfe8849a622c6308eaee333e8adba6c5bc3f457e (patch) | |
| tree | 155fdc30416d6ea11c03ad19ab6d156ba3f9e1a1 | |
| parent | 7c01721434e8ca3aba8a1e0cfca259bdc7b98191 (diff) | |
| download | rust-cfe8849a622c6308eaee333e8adba6c5bc3f457e.tar.gz rust-cfe8849a622c6308eaee333e8adba6c5bc3f457e.zip | |
Document extending list type configs
Signed-off-by: Tyler Weaver <maybe@tylerjw.dev>
| -rw-r--r-- | README.md | 9 | ||||
| -rw-r--r-- | book/src/configuration.md | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/README.md b/README.md index 81254ba8b8b..f7e03ca4cd8 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/book/src/configuration.md b/book/src/configuration.md index 430ff8b739a..bbe1081ccad 100644 --- a/book/src/configuration.md +++ b/book/src/configuration.md @@ -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. |
