about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorEduardo Broto <ebroto@tutanota.com>2020-05-21 15:34:48 +0200
committerEduardo Broto <ebroto@tutanota.com>2020-05-21 15:34:48 +0200
commitf9013ff197a693798f0532f88bab0ae591d5ff82 (patch)
treeeb2de4cb6ce91ae3bb915d8bc4d47befa2147451 /doc
parent1a04686fc0d2752de8731c833ab67bfae6136720 (diff)
Relax fs layout so that multiple pass/fail manifests are possible
Diffstat (limited to 'doc')
-rw-r--r--doc/adding_lints.md11
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/adding_lints.md b/doc/adding_lints.md
index 75768681db9..b3f5a62d553 100644
--- a/doc/adding_lints.md
+++ b/doc/adding_lints.md
@@ -43,7 +43,7 @@ case), and we don't need type information so it will have an early pass type
 (category will default to nursery if not provided). This command will create
 two files: `tests/ui/foo_functions.rs` and `clippy_lints/src/foo_functions.rs`,
 as well as run `cargo dev update_lints` to register the new lint. For cargo lints,
-two project hierarchies (fail/pass) will be created under `tests/ui-cargo`.
+two project hierarchies (fail/pass) will be created by default under `tests/ui-cargo`.
 
 Next, we'll open up these files and add our lint!
 
@@ -110,12 +110,17 @@ specific lint you are creating/editing.
 ### Cargo lints
 
 For cargo lints, the process of testing differs in that we are interested in
-the contents of the `Cargo.toml` files. If our new lint is named e.g. `foo_categories`,
-after running `cargo dev new_lint` we will find two new manifest files:
+the `Cargo.toml` manifest file. We also need a minimal crate associated
+with that manifest.
+
+If our new lint is named e.g. `foo_categories`, after running `cargo dev new_lint` 
+we will find by default two new crates, each with its manifest file:
 
 * `tests/ui-cargo/foo_categories/fail/Cargo.toml`: this file should cause the new lint to raise an error.
 * `tests/ui-cargo/foo_categories/pass/Cargo.toml`: this file should not trigger the lint.
 
+If you need more cases, you can copy one of those crates (under `foo_categories`) and rename it.
+
 The process of generating the `.stderr` file is the same, and prepending the `TESTNAME`
 variable to `cargo uitest` works too, but the script to update the references
 is in another path: `tests/ui-cargo/update-all-references.sh`.