salesforcedx-vscode
salesforcedx-vscode copied to clipboard
Code coverage showing unknown color that isn't covered or uncovered
Summary
In addition to the expected covered/green/lime and the uncovered/red lines in the code coverage there is an additional color that is roughly between the other two.
Steps To Reproduce:
- Run all tests in the org
- Open the code coverage for a specific class. I was looking at the SFDCAccessController.cls from the ESAPI
Expected result
Lines are one of:
- Covered / Green
- Uncovered / Red
- Not applicable / Uncolored
Actual result
An additional line color measured as #5E5620 is showing up in some locations
Additional information
Salesforce StackExchange Q - Visual Studio Code Apex class code coverage colors
VS Code Version: 1.36
SFDX CLI Version: 7.18
OS and version: Windows 10
It appears that /src/codecoverage/colorizer.ts isn't removing the covered lines from the uncovered lines before applying the decorations. As such, the coveredLinesDecorationType
and uncoveredLinesDecorationType
decoration types are being combined on lines that are covered by some tests and not others.
That doesn't really explain why line 124 isn't affected by this...
This issue has been linked to a new work item: W-10935878
Closing this issue as it's not reproducible anymore and feature is working fine.