Open carlosfrodriguez opened 5 years ago
AFAIK this is actually the desired behaviour, since the problems are still there in the files, even after you closed them (mind the problem counter in the file browser tree!).
For myself this beahviour is also sometimes disturbing, I solve the problem by simply reloading VSCode (with the Reload command) after closing the files. This successfully "cleans" the problems pane.
I see, but still think that at least it should be configurable. currently it is the only linter that I use that have this behavior and since perlcritic are more warnings that real blocking errors, I feel that the default behavior should be to remove them on file close.
Hi @sfodje any comments about this?
This behavior is the same for all extensions (Bash, Python, Typescript, C++,...), as it is indeed what VS Code offers through the extension API: If you open a file during your work session, then you must be interested if there are any diagnostics in there. And these accumulate over all the files that you open. Typically, the programmer will open a file with the intent of fixing/reducing the diagnostics. But if you decide to close that file before the task is accomplished, you want to be aware of the remaining issues!
So, as long as your VS Code work session lasts, you have a correct tally of all the problems that you have disclosed, even if you close the files.
If you are no longer interested in that tally, as @afgit indicates, you just start a brand new work session (by reloading your Window, or exiting and restarting).
If we still think that closing a file also means "forget about the errors I left in there", then this is a feature that needs to be requested from Microsoft, not the extension?
When I open a file that has some perl critic issues the warnings popup this is correct, then the problems pane is populated, this is also good, but when I close the file, even all files the problem pane keeps populated, while the expectation was that this pane will decrease the number of problems as files are closed until it displays 0, when all files are closed, even if there was no fix.