Skip to content

Commit e9d37ca

Browse files
committed
Note that stderr files don't have to be created manually
1 parent 21f8ee3 commit e9d37ca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/adding_lints.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Let's write some tests first that we can execute while we iterate on our lint.
3434
Clippy uses UI tests for testing. UI tests check that the output of Clippy is
3535
exactly as expected. Each test is just a plain Rust file that contains the code
3636
we want to check. The output of Clippy is compared against a `.stderr` file.
37+
Note that you don't have to create this file yourself, we'll get to
38+
generating the `.stderr` files further down.
3739

3840
Let's create the test file at `tests/ui/foo_functions.rs`. It doesn't really
3941
matter what the file is called, but it's a good convention to name it after the
@@ -81,9 +83,9 @@ While you are working on implementing your lint, you can keep running the UI
8183
test. That allows you to check if the output is turning into what you want.
8284

8385
Once you are satisfied with the output, you need to run
84-
`tests/ui/update-all-references.sh` to update the `stderr` file for your lint.
86+
`tests/ui/update-all-references.sh` to update the `.stderr` file for your lint.
8587
Running `TESTNAME=ui/foo_functions cargo uitest` should pass then. When you
86-
commit your lint, be sure to commit the `*.stderr` files, too.
88+
commit your lint, be sure to commit the `.stderr` files, too.
8789

8890
### Rustfix tests
8991

0 commit comments

Comments
 (0)