Skip to content

enforcing 'UNSPECIFIED' for 0 in enums that are bitmasks feels wrong #24

@wijnandatgoogle

Description

@wijnandatgoogle

Any enum value of 0 must have a name that ends with _UNSPECIFIED at the moment. That makes sense for regular enums that relate to something you can pick from a list. But when the enum is a bitmask, the value 0 is a valid and useful number. If there needs to be a check on naming conventions there too, I would suggest enforcing that it ends with _NONE. None makes sense to me because none of the flags in the bitmask are set.

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