File tree 1 file changed +20
-16
lines changed
1 file changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -339,22 +339,26 @@ lint declaration.
339
339
Please document your lint with a doc comment akin to the following:
340
340
341
341
``` 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
+ }
358
362
```
359
363
360
364
Once your lint is merged, this documentation will show up in the [ lint
You can’t perform that action at this time.
0 commit comments