mirror of https://github.com/astral-sh/ruff
Add rule documentation template to `scripts/add_rule.py` (#5519)
This commit is contained in:
parent
26a268a3ec
commit
5100c56273
|
|
@ -98,6 +98,17 @@ use ruff_macros::{{derive_message_formats, violation}};
|
|||
|
||||
use crate::checkers::ast::Checker;
|
||||
|
||||
/// ## What it does
|
||||
///
|
||||
/// ## Why is this bad?
|
||||
///
|
||||
/// ## Example
|
||||
/// ```python
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
/// ```python
|
||||
/// ```
|
||||
#[violation]
|
||||
pub struct {name};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue