EasyP

Enum First Value Zero

Categories:

  • MINIMAL
  • BASIC
  • DEFAULT

This rule checks that the first value of an enum is zero.

Examples

Bad


syntax = "proto3";

package foo;

enum Foo {
    BAR = 1;
    BAZ = 2;
}

Good

syntax = "proto3";

package foo;

enum Foo {
    BAR = 0;
    BAZ = 1;
}

On this page