about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarcusGrass <marcus.grass@protonmail.com>2023-06-01 12:54:20 +0200
committerMarcusGrass <marcus.grass@protonmail.com>2023-06-01 12:54:20 +0200
commit194343fceaa30c021af3fb4456acd16aa8034797 (patch)
tree74156c46c1d51a5abf49aec0c5f6952582a933b8
parent5f5e2e2ac137b19f2f2a21562ca34a6edb1a7d8f (diff)
downloadrust-194343fceaa30c021af3fb4456acd16aa8034797.tar.gz
rust-194343fceaa30c021af3fb4456acd16aa8034797.zip
Explain path-search using a list
-rw-r--r--book/src/configuration.md12
-rw-r--r--book/src/development/adding_lints.md12
2 files changed, 16 insertions, 8 deletions
diff --git a/book/src/configuration.md b/book/src/configuration.md
index 54af30d17e1..e8274bc4575 100644
--- a/book/src/configuration.md
+++ b/book/src/configuration.md
@@ -2,10 +2,14 @@
 
 > **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
-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
-found, the current directory. It contains a basic `variable = value` mapping e.g.
+Some lints can be configured in a TOML file named `clippy.toml` or `.clippy.toml`, which is searched for in:
+
+1. The directory specified by the `CLIPPY_CONF_DIR` environment variable, or
+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
 avoid-breaking-exported-api = false
diff --git a/book/src/development/adding_lints.md b/book/src/development/adding_lints.md
index ea3819ccbdf..c26aa883eba 100644
--- a/book/src/development/adding_lints.md
+++ b/book/src/development/adding_lints.md
@@ -630,10 +630,14 @@ Before submitting your PR make sure you followed all the basic requirements:
 
 ## Adding configuration to a lint
 
-Clippy supports the configuration of lints values using a `clippy.toml` file in a directory specified by
-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
-found, the current directory. Adding a configuration to a lint can be useful for
+Clippy supports the configuration of lints values using a `clippy.toml` file which is searched for in:
+
+1. The directory specified by the `CLIPPY_CONF_DIR` environment variable, or
+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
 for some users. Adding a configuration is done in the following steps: