Explain path-search using a list

This commit is contained in:
MarcusGrass 2023-06-01 12:54:20 +02:00
parent 5f5e2e2ac1
commit 194343fcea
No known key found for this signature in database
GPG Key ID: B3F995FE064E3AA9
2 changed files with 16 additions and 8 deletions

View File

@ -2,10 +2,14 @@
> **Note:** The configuration file is unstable and may be deprecated in the future. > **Note:** The configuration file is unstable and may be deprecated in the future.
Some lints can be configured in a TOML file named `clippy.toml` or `.clippy.toml`, placed in a directory specified by Some lints can be configured in a TOML file named `clippy.toml` or `.clippy.toml`, which is searched for in:
the environment variable `CLIPPY_CONF_DIR`, or if that's not found, the environment variable
[CARGO_MANIFEST_DIR](https://doc.rust-lang.org/cargo/reference/environment-variables.html), or if that isn't 1. The directory specified by the `CLIPPY_CONF_DIR` environment variable, or
found, the current directory. It contains a basic `variable = value` mapping e.g. 2. The directory specified by the
[CARGO_MANIFEST_DIR](https://doc.rust-lang.org/cargo/reference/environment-variables.html) environment variable, or
3. The current directory.
It contains a basic `variable = value` mapping e.g.
```toml ```toml
avoid-breaking-exported-api = false avoid-breaking-exported-api = false

View File

@ -630,10 +630,14 @@ Before submitting your PR make sure you followed all the basic requirements:
## Adding configuration to a lint ## Adding configuration to a lint
Clippy supports the configuration of lints values using a `clippy.toml` file in a directory specified by Clippy supports the configuration of lints values using a `clippy.toml` file which is searched for in:
the environment variable `CLIPPY_CONF_DIR`, or if that's not found, the environment variable
[CARGO_MANIFEST_DIR](https://doc.rust-lang.org/cargo/reference/environment-variables.html), or if that isn't 1. The directory specified by the `CLIPPY_CONF_DIR` environment variable, or
found, the current directory. Adding a configuration to a lint can be useful for 2. The directory specified by the
[CARGO_MANIFEST_DIR](https://doc.rust-lang.org/cargo/reference/environment-variables.html) environment variable, or
3. The current directory.
Adding a configuration to a lint can be useful for
thresholds or to constrain some behavior that can be seen as a false positive thresholds or to constrain some behavior that can be seen as a false positive
for some users. Adding a configuration is done in the following steps: for some users. Adding a configuration is done in the following steps: