Closed ethiery closed 4 years ago
I also get a similar error with the following proto:
message RegisterRequest {
string username = 1 [(shared.proto.validator.field) = {regex: "^[a-z0-9_]{3,32}$"}]; // <- OK here
string email = 2 [(shared.proto.validator.field) = {regex: "^.+@.+$", length_lt: 101}]; // error here
string password = 3 [(shared.proto.validator.field) = {msg_exists: true, length_gt: 7}]; // also an error here
}
The plugin incorrectly complains about the "," symbol: <missing '}'>
and then it fails to parse everything that follows this comma.
Even worse: if you then try to reformat the code in this case, you end up with a severely jumbled file, with one symbol per line
I think this is the same issue. Second line always gets me error(the foo.bar errors only because it is non existent example):
This issue is closed as plugin is not supported anymore. Please switch to https://github.com/jvolkman/intellij-protobuf-editor.
Describe the bug The plugin currently highlights closing brackets in extensions as errors.
To Reproduce I came across this bug using protoc-gen-validate Steps to reproduce the behavior:
$GOPATH/src/github.com/lyft/protoc-gen-validate
to include paths of the plugin.import "validate/validate.proto";
package myproto;
message MyMessage { MyEnum enum = 1 [(validate.rules).enum = {not_in: [0]}]; }
enum MyEnum { ZERO = 0; ONE = 1; }