Skip to content

enum-pascal-case

Protobufstyleno fixdefault: offprotobuf/buf-standard

Reports an enum name that is not PascalCase.

The Protobuf style guide names types in PascalCase, and the generated code of most languages uses the name as a type name, where another form reads as something else.

To fix, rename to PascalCase.

Reported
...
}
}
enum bad_enum {
BAD_ENUM_UNSPECIFIED = 0;
...
}
...
protobuf:
lint:
rules:
enum-pascal-case: warn # off (default), warn, error

Enabled by the presets: protobuf/buf-standard.

Suppress one line with sudsy-disable-next-line enum-pascal-case in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
buf ENUM_PASCAL_CASE full