about summary refs log tree commit diff
path: root/book/src/development
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-02-28 16:12:10 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-06-26 14:13:07 +0000
commit514b6d04bb63b08e76a3690973b7090b14a85799 (patch)
treeebce1fa55d2fd475b175b95e3901ad40409b7292 /book/src/development
parent78e36d9f53d8afe2062a3e6ea95f5f638ffd44be (diff)
downloadrust-514b6d04bb63b08e76a3690973b7090b14a85799.tar.gz
rust-514b6d04bb63b08e76a3690973b7090b14a85799.zip
Port clippy away from compiletest to ui_test
Diffstat (limited to 'book/src/development')
-rw-r--r--book/src/development/adding_lints.md17
-rw-r--r--book/src/development/basics.md2
2 files changed, 8 insertions, 11 deletions
diff --git a/book/src/development/adding_lints.md b/book/src/development/adding_lints.md
index c26aa883eba..cfcb060c46e 100644
--- a/book/src/development/adding_lints.md
+++ b/book/src/development/adding_lints.md
@@ -122,20 +122,17 @@ fn main() {
 }
 ```
 
-Now we can run the test with `TESTNAME=foo_functions cargo uitest`, currently
+Now we can run the test with `TESTNAME=foo_functions cargo uibless`, currently
 this test is meaningless though.
 
 While we are working on implementing our lint, we can keep running the UI test.
-That allows us to check if the output is turning into what we want.
+That allows us to check if the output is turning into what we want by checking the
+`.stderr` file that gets updated on every test run.
 
-Once we are satisfied with the output, we need to run `cargo dev bless` to
-update the `.stderr` file for our lint. Please note that, we should run
-`TESTNAME=foo_functions cargo uitest` every time before running `cargo dev
-bless`. Running `TESTNAME=foo_functions cargo uitest` should pass then. When we
+Running `TESTNAME=foo_functions cargo uitest` should pass on its own. When we
 commit our lint, we need to commit the generated `.stderr` files, too. In
-general, you should only commit files changed by `cargo dev bless` for the
-specific lint you are creating/editing. Note that if the generated files are
-empty, they should be removed.
+general, you should only commit files changed by `cargo bless` for the
+specific lint you are creating/editing.
 
 > _Note:_ you can run multiple test files by specifying a comma separated list:
 > `TESTNAME=foo_functions,test2,test3`.
@@ -169,7 +166,7 @@ additionally run [rustfix] for that test. Rustfix will apply the suggestions
 from the lint to the code of the test file and compare that to the contents of a
 `.fixed` file.
 
-Use `cargo dev bless` to automatically generate the `.fixed` file after running
+Use `cargo bless` to automatically generate the `.fixed` file while running
 the tests.
 
 [rustfix]: https://github.com/rust-lang/rustfix
diff --git a/book/src/development/basics.md b/book/src/development/basics.md
index 7615dc12f9e..f4c109ff119 100644
--- a/book/src/development/basics.md
+++ b/book/src/development/basics.md
@@ -66,7 +66,7 @@ If the output of a [UI test] differs from the expected output, you can update
 the reference file with:
 
 ```bash
-cargo dev bless
+cargo bless
 ```
 
 For example, this is necessary if you fix a typo in an error message of a lint,