ksprojects / protobuf-jetbrains-plugin

Protobuf Support for JetBrains IDEs
https://plugins.jetbrains.com/plugin/8277
Apache License 2.0
259 stars 45 forks source link

Option values expressed with complex text format notation are not parsed properly #147

Closed bjaglin closed 5 years ago

bjaglin commented 5 years ago

Describe the bug Option values expressed with nested text format notation are not parsed properly, highlighting false positive errors

To Reproduce Open in IntelliJ this file that goes through protoc fine:

syntax = "proto2";

// https://raw.githubusercontent.com/envoyproxy/protoc-gen-validate/dbe039e/validate/validate.proto
import "validate/validate.proto";

message Foo {
    optional int64 bar = 1 [(validate.rules).int64 = { gte: 42 }]; //OK
    optional int64 baz = 2 [(validate.rules) = { int64: { gte: 42 } }]; //KO
    optional int64 qux = 3 [(validate.rules).int64 = { in: [1, 2, 3] }]; //KO
}

Actual behavior Parsing errors (red highlights)

Expected behavior No parsing errors (red highlights)

Plugin (please complete the following information):

bjaglin commented 5 years ago

duplicate of https://github.com/protostuff/protobuf-jetbrains-plugin/issues/143