@@ -122,20 +122,17 @@ fn main() {
122
122
}
123
123
```
124
124
125
- Now we can run the test with ` TESTNAME=foo_functions cargo uitest ` , currently
125
+ Now we can run the test with ` TESTNAME=foo_functions cargo uibless ` , currently
126
126
this test is meaningless though.
127
127
128
128
While we are working on implementing our lint, we can keep running the UI test.
129
- That allows us to check if the output is turning into what we want.
129
+ That allows us to check if the output is turning into what we want by checking the
130
+ ` .stderr ` file that gets updated on every test run.
130
131
131
- Once we are satisfied with the output, we need to run ` cargo dev bless ` to
132
- update the ` .stderr ` file for our lint. Please note that, we should run
133
- ` TESTNAME=foo_functions cargo uitest ` every time before running `cargo dev
134
- bless` . Running ` TESTNAME=foo_functions cargo uitest` should pass then. When we
132
+ Running ` TESTNAME=foo_functions cargo uitest ` should pass on its own. When we
135
133
commit our lint, we need to commit the generated ` .stderr ` files, too. In
136
- general, you should only commit files changed by ` cargo dev bless ` for the
137
- specific lint you are creating/editing. Note that if the generated files are
138
- empty, they should be removed.
134
+ general, you should only commit files changed by ` cargo bless ` for the
135
+ specific lint you are creating/editing.
139
136
140
137
> _ Note:_ you can run multiple test files by specifying a comma separated list:
141
138
> ` TESTNAME=foo_functions,test2,test3 ` .
@@ -169,7 +166,7 @@ additionally run [rustfix] for that test. Rustfix will apply the suggestions
169
166
from the lint to the code of the test file and compare that to the contents of a
170
167
` .fixed ` file.
171
168
172
- Use ` cargo dev bless ` to automatically generate the ` .fixed ` file after running
169
+ Use ` cargo bless ` to automatically generate the ` .fixed ` file while running
173
170
the tests.
174
171
175
172
[ rustfix ] : https://github.com/rust-lang/rustfix
0 commit comments