EasyP

Comment Oneof

Categories:

  • COMMENT

This rule checks that oneof has a comment.

Examples

Bad

syntax = "proto3";

message Foo {
    oneof bar {
        string baz = 1;
        string qux = 2;
    }
}

Good

syntax = "proto3";

message Foo {
    // bar oneof for baz and qux logic
    oneof bar {
        string baz = 1; 
        string qux = 2; 
    }
}

On this page