Skip to content

Commit 194343f

Browse files
committed
Explain path-search using a list
1 parent 5f5e2e2 commit 194343f

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

book/src/configuration.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

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

1014
```toml
1115
avoid-breaking-exported-api = false

book/src/development/adding_lints.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,14 @@ Before submitting your PR make sure you followed all the basic requirements:
630630

631631
## Adding configuration to a lint
632632

633-
Clippy supports the configuration of lints values using a `clippy.toml` file in a directory specified by
634-
the environment variable `CLIPPY_CONF_DIR`, or if that's not found, the environment variable
635-
[CARGO_MANIFEST_DIR](https://doc.rust-lang.org/cargo/reference/environment-variables.html), or if that isn't
636-
found, the current directory. Adding a configuration to a lint can be useful for
633+
Clippy supports the configuration of lints values using a `clippy.toml` file which is searched for in:
634+
635+
1. The directory specified by the `CLIPPY_CONF_DIR` environment variable, or
636+
2. The directory specified by the
637+
[CARGO_MANIFEST_DIR](https://doc.rust-lang.org/cargo/reference/environment-variables.html) environment variable, or
638+
3. The current directory.
639+
640+
Adding a configuration to a lint can be useful for
637641
thresholds or to constrain some behavior that can be seen as a false positive
638642
for some users. Adding a configuration is done in the following steps:
639643

0 commit comments

Comments
 (0)