Open dwo opened 5 years ago
There's another case which I'm not sure about (it could be the same bug or something else entirely).
With an example.proto
(which does compile, oddly enough):
syntax = "proto3";
message Example // comment before brace
{
enum Foo {
FOO_INVALID = 1; // Wrong, enums start at zero
}
}
Now I get:
$ prototool lint example.proto
example.proto:5:17: found "// comment before brace" but expected [message opening {]
Correct line and column this time, however...
$ prototool lint --json example.proto
example.proto:5:17: found "// comment before brace" but expected [message opening {]
The output is the same, rather than being in the expected JSON format.
I will try and look into the code later if I get a chance.
Thanks for filing, I will take a look.
My environment:
With an
example.proto
:Example 1:
I think the numbers should be line 5 and column 5?
Example 2:
For the JSON output, line number is missing entirely.