Closed jd1378 closed 3 years ago
I did some debugging, it seems it's failing to get the errorLine
from the following string:
[d:\Projects\Private\go\playground\greet\greetpb\greet.proto:57:1] The line length is 88, but it must be shorter than 80
inside protoError.ts
at line 11, so it returns NaN
.
I'm not sure if this is intended behavior, Can you check it out ?
hmm, actually I think it makes sense if it's only broken on windows, since in Unix we should not have the first :
, so it would get the line number properly, but in windows that extra :
breaks it.
I propose changing parseInt(error.split(":")[1], 10)
to parseInt(error.split(".proto:")[1], 10)
, It would work on any OS, but would then break if the file extension is something else, but that's unlikely imo (because the docs only talks about .proto
files)
Edit: I have tested the fix on windows only and it works
@jd1378 thanks for reporting this. This is incredibly helpful. I'm looking into your proposed fix now.
@jd1378 v0.4.0
with this change has been released and published to the Marketplace.
Thanks @jpreese , I can confirm it's fixed now.
I'm on Windows 10 Pro 1909, using vscode 1.48.0-insider, tested also on 1.47.1 and still doesn't work. protolint is in the path, I can run it in terminal and get resultss I have no
.protolint.yaml
file, so I assume it should use the defaults even with having one at the root of project, it doesn't work I usually open my projects using "open folder" option of vscode, if that is of any importance using a workspace didn't help either