Skip to content

Commit 34685a5

Browse files
committed
Update comment location
1 parent 3c67c62 commit 34685a5

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

doc/adding_lints.md

+20-16
Original file line numberDiff line numberDiff line change
@@ -339,22 +339,26 @@ lint declaration.
339339
Please document your lint with a doc comment akin to the following:
340340

341341
```rust
342-
/// **What it does:** Checks for ... (describe what the lint matches).
343-
///
344-
/// **Why is this bad?** Supply the reason for linting the code.
345-
///
346-
/// **Known problems:** None. (Or describe where it could go wrong.)
347-
///
348-
/// **Example:**
349-
///
350-
/// ```rust,ignore
351-
/// // Bad
352-
/// Insert a short example of code that triggers the lint
353-
///
354-
/// // Good
355-
/// Insert a short example of improved code that doesn't trigger the lint
356-
/// ```
357-
declare_clippy_lint! { /* ... */ }
342+
declare_clippy_lint! {
343+
/// **What it does:** Checks for ... (describe what the lint matches).
344+
///
345+
/// **Why is this bad?** Supply the reason for linting the code.
346+
///
347+
/// **Known problems:** None. (Or describe where it could go wrong.)
348+
///
349+
/// **Example:**
350+
///
351+
/// ```rust,ignore
352+
/// // Bad
353+
/// Insert a short example of code that triggers the lint
354+
///
355+
/// // Good
356+
/// Insert a short example of improved code that doesn't trigger the lint
357+
/// ```
358+
pub FOO_FUNCTIONS,
359+
pedantic,
360+
"function named `foo`, which is not a descriptive name"
361+
}
358362
```
359363

360364
Once your lint is merged, this documentation will show up in the [lint

0 commit comments

Comments
 (0)