Skip to content

Commit 5d7e55c

Browse files
Mention about .fixed files
1 parent ae3216e commit 5d7e55c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

book/src/development/adding_lints.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,18 @@ fn main() {
127127

128128
Note that we are adding comment annotations with the name of our lint to mark
129129
lines where we expect an error. Once we have implemented our lint we can run
130-
`TESTNAME=foo_functions cargo uibless` to generate the `.stderr` file.
130+
`TESTNAME=foo_functions cargo uibless` to generate the `.stderr` file. If our
131+
lint makes use of structured suggestions then this command will also generate
132+
the corresponding `.fixed` file.
131133

132134
While we are working on implementing our lint, we can keep running the UI test.
133135
That allows us to check if the output is turning into what we want by checking the
134136
`.stderr` file that gets updated on every test run.
135137

136138
Once we have implemented our lint running `TESTNAME=foo_functions cargo uitest`
137139
should pass on its own. When we commit our lint, we need to commit the generated
138-
`.stderr` files, too. In general, you should only commit files changed by
139-
`cargo bless` for the specific lint you are creating/editing.
140+
`.stderr` and if applicable `.fixed` files, too. In general, you should only
141+
commit files changed by `cargo bless` for the specific lint you are creating/editing.
140142

141143
> _Note:_ you can run multiple test files by specifying a comma separated list:
142144
> `TESTNAME=foo_functions,test2,test3`.

0 commit comments

Comments
 (0)