Skip to content

Commit d1caaa4

Browse files
committed
s/you/we; One more checklist item
1 parent 8d2cbb9 commit d1caaa4

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

doc/adding_lints.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ we want to check. The output of Clippy is compared against a `.stderr` file.
3838
Note that you don't have to create this file yourself, we'll get to
3939
generating the `.stderr` files further down.
4040

41-
Let's create the test file at `tests/ui/foo_functions.rs`. It doesn't really
42-
matter what the file is called, but it's a good convention to name it after the
43-
lint it is testing, so `foo_functions.rs` it is.
41+
We start by creating the test file at `tests/ui/foo_functions.rs`. It doesn't
42+
really matter what the file is called, but it's a good convention to name it
43+
after the lint it is testing, so `foo_functions.rs` it is.
4444

45-
Inside we put some examples to get started:
45+
Inside the file we put some examples to get started:
4646

4747
```rust
4848
#![warn(clippy::foo_functions)]
@@ -80,13 +80,13 @@ Now we can run the test with `TESTNAME=ui/foo_functions cargo uitest`.
8080
Currently this test will fail. If you go through the output you will see that we
8181
are told that `clippy::foo_functions` is an unknown lint, which is expected.
8282

83-
While you are working on implementing your lint, you can keep running the UI
84-
test. That allows you to check if the output is turning into what you want.
83+
While we are working on implementing our lint, we can keep running the UI
84+
test. That allows us to check if the output is turning into what we want.
8585

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

9191
### Rustfix tests
9292

@@ -139,8 +139,8 @@ state the thing that is being checked for and read well when used with
139139
* The last part should be a text that explains what exactly is wrong with the
140140
code
141141

142-
With our lint declaration done, we will now make sure that our lint declaration
143-
is assigned to a lint pass:
142+
With our lint declaration done, we will now make sure that it is assigned to a
143+
lint pass:
144144

145145
```rust
146146
// clippy_lints/src/foo_functions.rs
@@ -166,10 +166,10 @@ impl LintPass for FooFunctionsPass {
166166
Don't worry about the `name` method here. As long as it includes the name of the
167167
lint pass it should be fine.
168168

169-
Next you should run `util/dev update_lints` to register the lint in various
169+
Next we need to run `util/dev update_lints` to register the lint in various
170170
places, mainly in `clippy_lints/src/lib.rs`.
171171

172-
While `update_lints` automates some things, it doesn't automate everything. You
172+
While `update_lints` automates some things, it doesn't automate everything. We
173173
will have to register our lint pass manually in the `register_plugins` function
174174
in `clippy_lints/src/lib.rs`:
175175

@@ -251,7 +251,7 @@ Running our UI test should now produce output that contains the lint message.
251251

252252
### Adding the lint logic
253253

254-
Writing the logic for our lint will most likely be different from this example,
254+
Writing the logic for your lint will most likely be different from our example,
255255
so this section is kept rather short.
256256

257257
Using the [`check_fn`][check_fn] method gives us access to [`FnKind`][fn_kind]
@@ -295,7 +295,7 @@ fn is_foo_fn(fn_kind: FnKind<'_>) -> bool {
295295
}
296296
```
297297

298-
Now you'll want to also run the full test suite with `cargo test`. At this point
298+
Now we should also run the full test suite with `cargo test`. At this point
299299
running `cargo test` should produce the expected output. Remember to run
300300
`tests/ui/update-all-references.sh` to update the `.stderr` file.
301301

@@ -386,6 +386,7 @@ Before submitting your PR make sure you followed all of the basic requirements:
386386
- [ ] Followed [lint naming conventions][lint_naming]
387387
- [ ] Added passing UI tests (including committed `.stderr` file)
388388
- [ ] `cargo test` passes locally
389+
- [ ] Executed `util/dev update_lints`
389390
- [ ] Added lint documentation
390391

391392
### Cheatsheet

0 commit comments

Comments
 (0)