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

Improved Handling for Problems in Closed/Deleted Files #150

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

jackfrey13
Copy link
Contributor

Right now, if lintEntireProject is turned on, the onDidCloseTextDocument logic will not delete any diagnostics from the Problems tab. This is desirable in most cases, however if I close a file that's not in the workspace (i.e. unnamed SQLQuery_1) or if onDidCloseTextDocument gets called by the editor for a file that got closed because it was deleted, the diagnostics for the file should be removed in those cases.

The screenshot below shows an example where SQLQuery_2 and SQLQuery_3 were closed without being saved but still show in the Problems tab even though they are not files in the active workspace/project directory. This is undesirable because it results in the Problems tab showing linting errors for files that don't exist anymore.

image

@RobertOstermann
Copy link
Contributor

Thanks for the PR. This will be released in v3.1.3

@RobertOstermann RobertOstermann merged commit e4d9953 into sqlfluff:master Jul 25, 2024
5 checks passed
@jackfrey13 jackfrey13 deleted the problems-tab-fix branch July 25, 2024 16:28
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

Successfully merging this pull request may close these issues.

2 participants