Skip to content

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
jordanbreen28 added 2 commits November 24, 2023 11:21
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
@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