Closed ObliviousHarmony closed 10 months ago
When an error is caught](https://github.com/ObliviousHarmony/vscode-php-codesniffer/blob/88912e0d91076b52e88b37135473fd6eb5df8ea2/src/services/diagnostic-updater.ts#L201), it doesn't look like existing diagnostics are cleaned up. This means that problems might be left behind from a previous run and lead to confusion. Did it work even though it gave an error? What if they change the standard and get an error; it'll leave behind existing errors that are invalid?
phpCodeSniffer.standard
phpCodeSniffer.customStandard
The problems should be erased when the worker fails.
Description
When an error is caught](https://github.com/ObliviousHarmony/vscode-php-codesniffer/blob/88912e0d91076b52e88b37135473fd6eb5df8ea2/src/services/diagnostic-updater.ts#L201), it doesn't look like existing diagnostics are cleaned up. This means that problems might be left behind from a previous run and lead to confusion. Did it work even though it gave an error? What if they change the standard and get an error; it'll leave behind existing errors that are invalid?
Reproduction Steps
phpCodeSniffer.standard
setting to "Custom" andphpCodeSniffer.customStandard
to something invalid.Expected Behavior
The problems should be erased when the worker fails.