Skip to content

Commit d2a69c9

Browse files
committed
Update some documentation
1 parent 40fce45 commit d2a69c9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/adding_lints.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,15 @@ declare_lint_pass!(FooFunctions => [FOO_FUNCTIONS]);
191191
impl EarlyLintPass for FooFunctions {}
192192
```
193193

194-
Don't worry about the `name` method here. As long as it includes the name of the
195-
lint pass it should be fine.
196-
197-
The new lint automation runs `update_lints`, which automates some things, but it
198-
doesn't automate everything. We will have to register our lint pass manually in
199-
the `register_plugins` function in `clippy_lints/src/lib.rs`:
194+
Normally after declaring the lint, we have to run `cargo dev update_lints`,
195+
which updates some files, so Clippy knows about the new lint. Since we used
196+
`cargo dev new_lint ...` to generate the lint declaration, this was done
197+
automatically. While `update_lints` automates most of the things, it doesn't
198+
automate everything. We will have to register our lint pass manually in the
199+
`register_plugins` function in `clippy_lints/src/lib.rs`:
200200

201201
```rust
202-
reg.register_early_lint_pass(box foo_functions::FooFunctions);
202+
store.register_early_pass(box foo_functions::FooFunctions);
203203
```
204204

205205
This should fix the `unknown clippy lint: clippy::foo_functions` error that we

0 commit comments

Comments
 (0)