diff options
| author | Yutaro Ohno <yutaro.ono.418@gmail.com> | 2025-01-14 17:06:31 +0900 |
|---|---|---|
| committer | Yutaro Ohno <yutaro.ono.418@gmail.com> | 2025-01-28 16:22:28 +0900 |
| commit | 4693d0a9ffceeabed36d2e82be3cfce5e1322b30 (patch) | |
| tree | 5e0ff5fa639c5f416904b0598a894c7368c08471 /clippy_lints/src/declared_lints.rs | |
| parent | 66dc8a1a30b19f31454a9e58f8723500a1a8ad17 (diff) | |
Add new lint `doc_overindented_list_items`
Add a new lint `doc_overindented_list_items` to detect and fix list items
in docs that are overindented.
For example,
```rs
/// - first line
/// second line
fn foo() {}
```
this would be fixed to:
```rs
/// - first line
/// second line
fn foo() {}
```
This lint improves readabiliy and consistency in doc.
Diffstat (limited to 'clippy_lints/src/declared_lints.rs')
| -rw-r--r-- | clippy_lints/src/declared_lints.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clippy_lints/src/declared_lints.rs b/clippy_lints/src/declared_lints.rs index ec223381aec..da73ef3ced4 100644 --- a/clippy_lints/src/declared_lints.rs +++ b/clippy_lints/src/declared_lints.rs @@ -142,6 +142,7 @@ pub static LINTS: &[&crate::LintInfo] = &[ crate::doc::DOC_LINK_WITH_QUOTES_INFO, crate::doc::DOC_MARKDOWN_INFO, crate::doc::DOC_NESTED_REFDEFS_INFO, + crate::doc::DOC_OVERINDENTED_LIST_ITEMS_INFO, crate::doc::EMPTY_DOCS_INFO, crate::doc::EMPTY_LINE_AFTER_DOC_COMMENTS_INFO, crate::doc::EMPTY_LINE_AFTER_OUTER_ATTR_INFO, |
