oneof-lower-snake-case
What it does
Section titled “What it does”Reports a oneof name that is not lower_snake_case.
Why it matters
Section titled “Why it matters”The Protobuf style guide writes oneof names as it does fields, in lower_snake_case, since the generators turn it into a property.
To fix, rename the oneof.
Example
Section titled “Example”... oneof BadChoice { string b = 3;... }...Configuration
Section titled “Configuration”protobuf: lint: rules: oneof-lower-snake-case: warn # off (default), warn, errorEnabled by the presets: protobuf/buf-standard.
Suppress one line with sudsy-disable-next-line oneof-lower-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 | ONEOF_LOWER_SNAKE_CASE |
full |