Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

theme-check reports "full theme check" errors on removed files #569

Closed
vfonic opened this issue Feb 26, 2022 · 0 comments
Closed

theme-check reports "full theme check" errors on removed files #569

vfonic opened this issue Feb 26, 2022 · 0 comments
Assignees
Labels
bug Something isn't working language server Language Server related issues

Comments

@vfonic
Copy link

vfonic commented Feb 26, 2022

Repro steps:

  1. Create/update (liquid) file with theme-check errors
  2. Close the file in the VS Code editor
  3. Remove the file without opening it (right click + Delete, or delete the whole directory where it's located, or rm ..., or remove in Finder)
  4. Check PROBLEMS tab in VS Code

Expected:

The errors don't show errors from this non-existent file

Actual:

The errors show errors that were in this file before.

  1. Run >Liquid Theme Check: Run Checks

The errors are still present.

@charlespwd charlespwd transferred this issue from Shopify/theme-check-vscode Mar 30, 2022
@charlespwd charlespwd added the bug Something isn't working label Mar 30, 2022
@charlespwd charlespwd added the language server Language Server related issues label Jul 13, 2022
@charlespwd charlespwd self-assigned this Jul 22, 2022
charlespwd added a commit that referenced this issue Jul 27, 2022
- When you close a file and only_single_file is on, clear its diagnostics
- If you delete or rename a file, clear its diagnostics and rerun whole theme
  checks (in case MissingTemplate should now be reported)

Fixes #569
charlespwd added a commit that referenced this issue Jul 27, 2022
- When you close a file and only_single_file is on, clear its diagnostics
- If you delete or rename a file, clear its diagnostics and rerun whole theme
  checks (in case MissingTemplate should now be reported)

Fixes #569
charlespwd added a commit that referenced this issue Jul 28, 2022
- When you close a file and only_single_file is on, clear its diagnostics
- If you delete or rename a file, clear its diagnostics and rerun whole theme
  checks (in case MissingTemplate should now be reported)

Fixes #569
charlespwd added a commit that referenced this issue Jul 28, 2022
* Minor refactor of DiagnosticsEngine

* Handle array argument in analyze_and_send_offenses

* Adjust file rename diagnostics handling

- update our storage
- clear the old diagnostics from the DiagnosticsManager
- send "NO_DIAGNOSTICS" to the client for the deleted files
- rerun theme check for the new files

* More diagnostic lifecycle fixes

- When you close a file and only_single_file is on, clear its diagnostics
- If you delete or rename a file, clear its diagnostics and rerun whole theme
  checks (in case MissingTemplate should now be reported)

Fixes #569
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working language server Language Server related issues
Projects
None yet
Development

No branches or pull requests

2 participants