Skip to content

Detect code block marker in docs without "base indentation" #15023

Open
@ojeda

Description

@ojeda

What it does

In the Linux kernel we had some documentation examples added with triple backquotes at the end without indentation.

Such a lint would find a few hits, e.g. there is currently one in core.

Possibly related, at least implementation-wise: #15024 and #15025.

Advantage

  • More consistency in docs.
  • Less time spent by reviewers.

Drawbacks

No response

Example

/// ```
/// fn f() {}
///```

Should be written as:

/// ```
/// 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