Skip to content

Support case insensitive purposesΒ #31

@jesstelford

Description

@jesstelford

Problem Description

Currently, purposes must have a particular case to be detected / valid, which differs depending on the source:

@markings/source-comments

Requires purposes to be in uppercase to be detected. Anything else will be silently ignored.

βœ… Works:

// TODO: Do a thing

❌ Silently ignored:

// todo: Do a thing
// Todo: Do a thing

@markings/source-react

Requires purposes to be in lowercase, else will throw an error.

βœ… Works:

<Marking purpose="todo" description="Do a thing" />

❌ Throws an error:

<Marking purpose="Todo" description="Do a thing" />
<Marking purpose="TODO" description="Do a thing" />
Error: Purpose must be one of question, todo, fixme

Proposal

To reduce user errors and confusion (when comment sources are silently ignored), I propose:

  1. Make all purposes case insensitive:
    // Todo: Do a thing
    <Marking purpose="TODO" description="Do a thing" />
  2. Normalise the output of all purposes to lowercase (so TODO becomes todo, and Fixme becomes fixme, etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions