Skip to content

Commit 17903f6

Browse files
committed
Mention lint naming guidelines earlier
1 parent 51f2a6f commit 17903f6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

doc/adding_lints.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ There is a bit of boilerplate code that needs to be set up when creating a new
3535
lint. Fortunately, you can use the clippy dev tools to handle this for you. We
3636
are naming our new lint `foo_functions` (lints are generally written in snake
3737
case), and we don't need type information so it will have an early pass type
38-
(more on this later on). To get started on this lint you can run
39-
`cargo dev new_lint --name=foo_functions --pass=early --category=pedantic`
40-
(category will default to nursery if not provided). This command will create
41-
two files: `tests/ui/foo_functions.rs` and `clippy_lints/src/foo_functions.rs`,
42-
as well as run `cargo dev update_lints` to register the new lint. For cargo lints,
43-
two project hierarchies (fail/pass) will be created by default under `tests/ui-cargo`.
38+
(more on this later on). If you're not sure if the name you chose fits the lint,
39+
take a look at our [lint naming guidelines][lint_naming]. To get started on this
40+
lint you can run `cargo dev new_lint --name=foo_functions --pass=early
41+
--category=pedantic` (category will default to nursery if not provided). This
42+
command will create two files: `tests/ui/foo_functions.rs` and
43+
`clippy_lints/src/foo_functions.rs`, as well as run `cargo dev update_lints` to
44+
register the new lint. For cargo lints, two project hierarchies (fail/pass) will
45+
be created by default under `tests/ui-cargo`.
4446

4547
Next, we'll open up these files and add our lint!
4648

0 commit comments

Comments
 (0)