openweave / openweave-wdlc

This package makes available the Weave Data Language (WDL) compiler (WDLC). WDL is Weave's publish and subscribe schema language. The WDLC compiler can be used to compile (i.e., validate and code generate) schema written against the WDL specification.
https://openweave.io/
Apache License 2.0
2 stars 8 forks source link

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

Open wijnandatgoogle opened 5 years ago

wijnandatgoogle commented 5 years ago

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.