Skip to content

todo_comment_linter could get an argument for valid TODO patterns #2047

@MichaelChirico

Description

@MichaelChirico

This can allow TODO only if they fit certain patterns.

This could be used to enforce a rule like "All TODO must be tied to a bug, not a person".

## BAD
# TODO(michaelchirico): fix this
# TODO: add testing

## GOOD
# TODO(#nnn): fix this
# TODO(#mmm): add testing

Maybe an argument like allow_regex or allow_style_regex, in this case allow_regex = "TODO[(][#][0-9]+[)]:" could work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions