Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting results aren't updated on changing active editor or running protolint.lint command #32

Open
AlexCannonball opened this issue Apr 5, 2023 · 0 comments

Comments

@AlexCannonball
Copy link

AlexCannonball commented Apr 5, 2023

This is reproduced both in 0.7.0 and 0.8.0.

Steps:

  1. Open a protobuf file with some contents. Linting problems are displayed, if any.
  2. Make changes in the file, so that one linting problem is added or fixed.
  3. 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.
  4. 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.

AlexCannonball added a commit to AlexCannonball/vscode-protolint that referenced this issue Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant