vscode-protolint
vscode-protolint copied to clipboard
Linting results aren't updated on changing active editor or running protolint.lint command
This is reproduced both in 0.7.0 and 0.8.0.
Steps:
- Open a protobuf file with some contents. Linting problems are displayed, if any.
- Make changes in the file, so that one linting problem is added or fixed.
- Change active vs code editor, then go back to the protobuf file. The linting problems are back to the state when we first opened the protobuf file.
- Similar happens when running
protolint.lint
command via the command palette (CTRL + SHIFT + P).
So now linting problems are only updated properly when opening or saving a protobuf file.
I've checked the code and it seems that the diagnosticCollection
is not handled properly.
I've got an idea how to fix it and add the fix into #31 if it works.
Update: I've fixed the diagnosticCollection
and disposables' related issues, however, the root cause is that we convey the file to protolint, so the text is obviously updated only after the file is saved. I'm going to figure out whether the binary accepts text via stdin
.