Skip to content

Lint code that has been commented out #1348

Open

Description

Lint commented out code.

The goal is to prevent people from committing/pushing code that has been commented out, which is basically equivalent to dead code. Instead, they should remove the code and use their version control system if they want to recover it in the future.

This should for obvious reasons not trigger for doc comments, and only for comments that contain only code.

I have no good idea how to determine whether a comment is a "code that has been commented out" comment except for trying to parse it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsC-an-interesting-projectCategory: Interesting projects, that usually are more involved design/code wise.E-hardCall for participation: This a hard problem and requires more experience or effort to work onT-ASTType: Requires working with the AST

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions