enum-value-upper-snake-case
What it does
Section titled “What it does”Reports an enum value name that is not UPPER_SNAKE_CASE.
Why it matters
Section titled “Why it matters”The Protobuf style guide writes enum values in UPPER_SNAKE_CASE, as the generated code of many languages writes constants.
To fix, rename the value.
Example
Section titled “Example”...
... BAD_ENUM_UNSPECIFIED = 0; Bad_Value = 1;}
...Configuration
Section titled “Configuration”protobuf: lint: rules: enum-value-upper-snake-case: warn # off (default), warn, errorEnabled by the presets: protobuf/buf-standard.
Suppress one line with sudsy-disable-next-line enum-value-upper-snake-case in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| buf | ENUM_VALUE_UPPER_SNAKE_CASE |
full |