github.com/psrajat/prototool@v1.3.0/internal/cmd/testdata/lint/allgroup/lots.proto (about)

     1  syntax = "proto3";
     2  
     3  package foo.bAr;
     4  
     5  import "bar/dep.proto";
     6  
     7  message baz {}
     8  
     9  message Baz_bat {}
    10  
    11  message Bat {
    12    int64 Hello = 1;
    13    int64 helloWorld = 2;
    14    int64 hello_world_one_ = 3;
    15    int64 _hello_world_two = 4;
    16    int64 hello_world_three = 5;
    17    // normal comment
    18    int64 world = 6; // normal inline comment
    19    /*
    20      c-style comment
    21    */
    22    int64 world2 = 7;
    23    int64 world3 = 8; /* c-style inline comment */
    24  }
    25  
    26  service hello {}
    27  
    28  service World_woot {}
    29  
    30  message FooRequest {}
    31  message FooResponse {}
    32  
    33  
    34  message BarOneRequest {
    35      // message Foo
    36      message Hello {}
    37  }
    38  message BarOneResponse {}
    39  
    40  message Boo {
    41    message BooRequest {}
    42  }
    43  
    44  service Foobar {
    45    rpc Foo(FooRequest) returns (FooResponse) {}
    46    rpc FooOne(FooRequest) returns (FooResponse) {}
    47    rpc FooTwo(FooRequest) returns (FooResponse) {}
    48    rpc barOne(BarOneRequest) returns (BarOneResponse) {}
    49    rpc BarTwo(FooRequest) returns (bar.Dep) {}
    50    rpc Boo(Boo.BooRequest) returns (bar.Dep) {}
    51  }
    52  
    53  enum Hello {
    54    HELLO_INVALID = 0;
    55    HELLO_UNSET = 1;
    56    HELLO_TREE = 2;
    57    HELLO_BALLOON = 3;
    58    FOO_LAMP_POST = 4;
    59  }
    60  
    61  message Foo {
    62    message Bar {
    63      enum Baz {
    64        BAZ_INVALID = 0;
    65      }
    66      enum Bat {
    67        FOO_BAR_BAT_NONE = 0;
    68      }
    69    }
    70  }
    71  
    72  enum Bar {
    73    BAR_NONE = 0;
    74  }
    75  
    76  /* c-style file comment */
    77  
    78  message Woo {
    79    /* c-style reserved comment */
    80    reserved 10;
    81    /* c-style oneof comment */
    82    oneof woo {
    83      /* c-style oneof field comment */
    84      int64 field = 1;
    85    }
    86  }
    87  
    88  enum Hoo {
    89    HOO_INVALID = 0;
    90    HOO_one = 1;
    91  }
    92  
    93  enum Hoo_one {
    94    HOO_ONE_INVALID = 0;
    95  }