Apex Test code coverage - make colors configurable #5807
AndrewStopchenko-SO
started this conversation in
Ideas
Replies: 1 comment
-
As a colorblinded person I need this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
It is slightly inconvenient (to me) that the Apex code coverage default highlighting colors are lime/red.
When there are multiple
if () {}
statements in the code and the unit test covers only part of them, it is somewhat hard to detect the non-covered lines when the green and red highlighting colors are mixed back to back (see example1 below).I find it much easier to spot the uncovered lines with a fast glance e.g. when the "blue"/"red" palette is used, like it is in the Developer Console.
Describe the solution you'd like
If possible, please expose the covered/non-covered colors as a VS Code Apex extension settings.
It should be fine if "lime"/"red" highlight colors are used by default (if everybody are fine with that), but the end users could override those colors via settings.
Describe alternatives you've considered
I have found the JS file which handles test coverage decoration (%user%.vscode\extensions\salesforce.salesforcedx-vscode-apex-53.1.0\out\src\codecoverage\decorations.js) and updated it to highlight the covered lines with blue (please see example2 below).
Unfortunately, this "local" override gets removed every time the extension is updated.
Additional context
Example1 - current default color (lime/red):
Example2 - locally overridden color (blue/red):
Please note: the blue color
rgba(....)
values should be considered not to be mixed up with the text selection.Beta Was this translation helpful? Give feedback.
All reactions