salesforcedx-vscode icon indicating copy to clipboard operation
salesforcedx-vscode copied to clipboard

Code coverage showing unknown color that isn't covered or uncovered

Open FishOfPrey opened this issue 5 years ago • 2 comments

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:

  1. Run all tests in the org
  2. 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

Screenshot of unknown coverage color

VS Code Version: 1.36

SFDX CLI Version: 7.18

OS and version: Windows 10

FishOfPrey avatar Aug 15 '19 23:08 FishOfPrey

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...

FishOfPrey avatar Aug 16 '19 01:08 FishOfPrey

This issue has been linked to a new work item: W-10935878

uip-robot-zz avatar Apr 01 '22 20:04 uip-robot-zz

Closing this issue as it's not reproducible anymore and feature is working fine.

CristiCanizales avatar Aug 23 '24 18:08 CristiCanizales