Skip to content

Overindented lines lint (similar to doc_lazy_continuation) #13601

@ojeda

Description

@ojeda

What it does

The lint reports overindented lines, for instance in bullet lists (and potentially elsewhere?).

This could perhaps be considered a false negative of doc_lazy_continuation, but "lazy continuation lines" only cover removing indentation, not adding it.

Advantage

The advantages would be similar to doc_lazy_continuation:

  • Clearer (easier to read) documentation in plain text form, i.e. unrendered, which is important in some projects.

  • More consistency in documentation comments across a project (and across different projects, for those that enable the lint).

Drawbacks

No response

Example

/// - a
///    b
pub fn f() {}

Could be written as:

/// - a
///   b
pub fn f() {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions