protolint: protolint:disable not working for enums
I´m trying to use the disable marker on some proto files but i cannot get it to work on ENUMS rules. For example, this file:
syntax = "proto3";
// protolint:disable ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH
// protolint:disable ENUM_FIELD_NAMES_UPPER_SNAKE_CASE
package test;
import "google/protobuf/wrappers.proto";
option java_package = "com.test.example";
option java_outer_classname = "InfoProto";
/**
* Some enum
*/
enum Strategy {
DEFAULT= 0;
bY_LINE_ID = 1;
NONE = 2;
}
will always output these errors:
➜ ~ protolint lint example.proto
[example.proto:17:3] EnumField name "bY_LINE_ID" must be CAPITALS_WITH_UNDERSCORES
[example.proto:16:3] EnumField name "DEFAULT" with zero value should have the suffix "UNSPECIFIED"
I´ve tried with just one disable and I get the same result. I´ve found that other rules do work (e.g. protolint:enable MAX_LINE_LENGTH
)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (8 by maintainers)
I know… I’m in Ubuntu but other devs are in windows… The weird thing is that some other rules DO work. But, anyway, I’m looking forward to your PR 😃 Thanks !
Which version are you using? I cannot reproduce this using your example on
0.22.1
. Do you have a.protolint.yaml
file currently active?