Skip to content

Commit a0fd5cd

Browse files
committed
Update some documentation
1 parent b118f89 commit a0fd5cd

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+
After declaring the lint, you have to run `cargo dev update_lints`, which
195+
updates some files, so Clippy knows about the new lint. If you used `cargo dev
196+
new_lint ...` to declare the lint, this was done automatically. While
197+
`update_lints` automates most of the things, it doesn't automate everything. We
198+
will have to register our lint pass manually in the `register_plugins` function
199+
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)