diff options
| author | Francisco Salgueiro <fgcdbs@gmail.com> | 2024-04-03 17:07:12 +0100 |
|---|---|---|
| committer | Francisco Salgueiro <fgcdbs@gmail.com> | 2024-04-03 17:07:12 +0100 |
| commit | b6486fae5c9ce3610aa325a3c86d23871e05c1e8 (patch) | |
| tree | 36c049120adc374efdc43bb5c894bb2f874c2c55 | |
| parent | f9f854f4283c9239769f807f14a7475256c8730d (diff) | |
| download | rust-b6486fae5c9ce3610aa325a3c86d23871e05c1e8.tar.gz rust-b6486fae5c9ce3610aa325a3c86d23871e05c1e8.zip | |
add missing links in development guide
| -rw-r--r-- | book/src/development/defining_lints.md | 9 | ||||
| -rw-r--r-- | book/src/development/lint_passes.md | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/book/src/development/defining_lints.md b/book/src/development/defining_lints.md index 54f77b00190..806ed0845f0 100644 --- a/book/src/development/defining_lints.md +++ b/book/src/development/defining_lints.md @@ -62,9 +62,8 @@ $ cargo dev new_lint --name=lint_name --pass=late --category=pedantic There are two things to note here: 1. `--pass`: We set `--pass=late` in this command to do a late lint pass. The - alternative is an `early` lint pass. We will discuss this difference in a - later chapter. - <!-- FIXME: Link that "later chapter" when lint_passes.md is merged --> + alternative is an `early` lint pass. We will discuss this difference in the + [Lint Passes] chapter. 2. `--category`: If not provided, the `category` of this new lint will default to `nursery`. @@ -194,8 +193,7 @@ store.register_late_pass(|_| Box::new(foo_functions::FooFunctions)); As you might have guessed, where there's something late, there is something early: in Clippy there is a `register_early_pass` method as well. More on early -vs. late passes in a later chapter. -<!-- FIXME: Link that "later chapter" when lint_passes.md is merged --> +vs. late passes in the [Lint Passes] chapter. Without a call to one of `register_early_pass` or `register_late_pass`, the lint pass in question will not be run. @@ -203,3 +201,4 @@ pass in question will not be run. [all_lints]: https://rust-lang.github.io/rust-clippy/master/ [lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints +[Lint Passes]: lint_passes.md diff --git a/book/src/development/lint_passes.md b/book/src/development/lint_passes.md index 621fc20972e..dde9e1a273b 100644 --- a/book/src/development/lint_passes.md +++ b/book/src/development/lint_passes.md @@ -50,7 +50,7 @@ questions already, but the parser is okay with it. This is what we mean when we say `EarlyLintPass` deals with only syntax on the AST level. Alternatively, think of the `foo_functions` lint we mentioned in -define new lints <!-- FIXME: add link --> chapter. +the [Define New Lints](defining_lints.md) chapter. We want the `foo_functions` lint to detect functions with `foo` as their name. Writing a lint that only checks for the name of a function means that we only |
