Skip to content

New lint for leaving space between comment slashes (//) and content. #58388

@Jonas-Sander

Description

@Jonas-Sander

Describe the rule you'd like to see implemented
The lint should flag comments where there is no space between the slashes (// or ///) and the content of the comment.
This is the style used by Flutter and Dart.

Examples
Bad:

//Bad comment
///Bad doc-comment

Good:

// Good comment
/// Good doc comment

Some edge cases:

// An empty comment with no spaces after is okay:
//
//

// What about this:
///////////heey
// //Is this alright?

// An empty comment at the end of the file is probably also okay:
///

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.linter-lint-proposaltype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions