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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

(CAT-1595) - Remove diagnostic on textDoucment onDidClose #356

Merged
merged 2 commits into from Nov 24, 2023

Conversation

jordanbreen28
Copy link
Contributor

@jordanbreen28 jordanbreen28 commented Nov 24, 2023

Summary

Prior to this PR, diagnostics (or "problems") in the vscode problems pane would not be removed on the closing of a file. This is bad practice, and quickly leads to a polluted problems pane with linting issues etc showing for all files despite being open or not.

This PR aims to fix this issue, by calling publishDiagnostics in the vscode API on the close of a text document with an empty array of diagnostics as per the vscode documentation.

This has been verified as working in local vscode setup.
Before
Nov-24-2023 11-10-52

After
Nov-24-2023 11-11-35

Related Issues (if any)

Fixes #357

Checklist

  • 馃煝 Spec tests.
  • 馃煝 Acceptance tests.
  • Manually verified.

@jordanbreen28 jordanbreen28 requested a review from a team as a code owner November 24, 2023 11:12
Prior to this commit, diagnostics (or "problems") in the vscode problems
pane would not be removed on the closing of a file. This is bad
practice, and quickly leads to a polluted problems pane with linting
issues etc showing for all files despite being open or not.

This commit aims to fix this issue, by calling publishDiagnostics in the
vscode API on the close of a text document with an empty array of
diagnostics as per the vscode documentation.

This has been verified as working in local vscode setup.
@jordanbreen28 jordanbreen28 force-pushed the CAT-1595-remove_diagnostic_onClose branch from eeeea80 to 23e6ac0 Compare November 24, 2023 11:22
Copy link
Contributor

@LukasAud LukasAud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LukasAud LukasAud merged commit ea9961f into main Nov 24, 2023
11 of 12 checks passed
@LukasAud LukasAud deleted the CAT-1595-remove_diagnostic_onClose branch November 24, 2023 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Files stay in Problems pane when closed.
2 participants