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

Incorrect syntax error highlighting in workspace folder list #108131

Open
PaulSwarthout opened this issue Oct 5, 2020 · 1 comment
Open

Incorrect syntax error highlighting in workspace folder list #108131

PaulSwarthout opened this issue Oct 5, 2020 · 1 comment
Assignees
Labels
file-decorations under-discussion Issue is under discussion for relevance, priority, approach

Comments

@PaulSwarthout
Copy link

Issue Type: Bug

I use VS Code to develop WordPress plugins in PHP.

  1. Create a PHP file with a syntax error in it.
  2. Save it.

VS Code will highlight the file name in the folder list in red indicating the presence of an error. Further, it will red highlight all of the files parent folders all the way up the tree to indicate the presence of a syntax error.

I find this functionality to be very helpful.

  1. Go to VS Code Settings and exclude the file from the workspace.

The file disappears from the folder list under the Explorer tab. That's what I would expect.

But the parent folders all the way up the tree, continue to be red highlighted indicating the presence of a syntax error.

That is bad. I would expect that if the file with a syntax error is not included in the workspace, then the parent folders would no longer be red highlighted.

While developing, I will move code that's not working correctly, that I'm rewriting and replacing, to a subfolder. Sometimes I do that because the broken code shows the proper way to call a particular function, or is a way of doing something that I don't want to forget, etc. I want to keep the code, and keep it associated with the project. I may use some of it later.

Often those code snippets have errors. So, I exclude those folders and files from the project with .gitignore, and VS Code Settings Exclusions.

Unfortunately, VS Code continues to show me there is an error in the not-displayed, not-included file by highlight the parent folders in red. This renders the whole functionality of highlighting folders and files with errors useless because I just ignore the highlighting.

VS Code version: Code 1.49.3 (2af0510, 2020-10-02T17:57:01.595Z)
OS version: Windows_NT x64 10.0.19041

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (8 x 3392)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.89GB (9.27GB free)
Process Argv --crash-reporter-id 4a8c61d7-f6d3-495d-9576-c69834d93045
Screen Reader no
VM 0%
Extensions (2)
Extension Author (truncated) Version
php-debug fel 1.13.0
php-intellisense fel 2.3.14
@jrieken jrieken added file-decorations bug Issue identified by VS Code Team member as probable bug labels Oct 6, 2020
@jrieken jrieken added under-discussion Issue is under discussion for relevance, priority, approach and removed bug Issue identified by VS Code Team member as probable bug labels Nov 2, 2020
@jrieken
Copy link
Member

jrieken commented Nov 2, 2020

Removing bug label because things kinda work as expected. A file is not visible but it still has a compile error and that's correctly shown/bubbling. Arguably PHP shouldn't report an error at the first place but file/folder visibility is also not a good project descriptor. Unsure what to do here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
file-decorations under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests

2 participants