ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

Add option to show only uncovered lines #167

Open Tadaboody opened 6 years ago

Tadaboody commented 6 years ago

Feature Request:

Usually I only care if a line is uncovered. seeing all the green lines is more of a feel-good thing 😜, so I'd like the option to turn them off.

This will also let me leave the extension almost always watching while still having lots of places to add breakpoints while #95 is still a thing.

ryanluker commented 6 years ago

https://github.com/ryanluker/vscode-coverage-gutters#tips-and-tricks you can do just that now via the settings, let me know if that helps!

Tadaboody commented 6 years ago

My problem isn't putting breakpoints. I want the option to only view the red spots in the gutter - Only highlight the uncovered lines

ryanluker commented 6 years ago

@Tadaboody ahh gotcha, you can do this by modifying the settings (and restarting VS Code afterwords) to have it just show uncovered in the gutter by setting the other coverage type's color to nothing. This disables the decorations (vscode's terminology for the colorations that show up on the line and in the gutter) for full and partial, leaving you with the uncovered. https://github.com/ryanluker/vscode-coverage-gutters/blob/master/package.json#L112-L126 https://github.com/ryanluker/vscode-coverage-gutters/blob/master/package.json#L52-L111

Tadaboody commented 6 years ago

I tried this. it work, if a bit cumbersome.

Some of the settings are described/named in a bit of a confusing way, and the combination of #132 and #169 make configuring not very user-friendly.

Tadaboody commented 6 years ago

Actually looking at it again - I'm not sure your solution works

ryanluker commented 5 years ago

@Tadaboody just trying to flesh out this ticket a bit more and I am looking for some feedback on the approaches I will outline below.

I am thinking there will need to be new extension settings to handle turning off or on certain types of coverage (ie full, partial or none). Would you expect these to be granular per feature? For example turn off the full coverage for just the gutters or turn off full coverage altogether?

ryanluker commented 5 years ago

@Tadaboody Still looking for more input, from you, on this one (see my last comment). In the meantime I am going to move this out of the 2.3.0 release and into the backlog until it is fleshed out 👍 .

iansan5653 commented 5 years ago

@ryanluker Personally I think that making it granular per-feature would clutter the settings too much. Instead a simple checkbox for each coverage type would be great.

ssbarnea commented 1 year ago

Clearly that we need a solution to make the coverage information more subtle, as current behavior makes it hard to edit the code due to being too in-your-face.

ryanluker commented 1 year ago

Clearly that we need a solution to make the coverage information more subtle, as current behavior makes it hard to edit the code due to being too in-your-face.

Thanks for the comment @ssbarnea, have you tried tinkering with the colours or some of the options in the extension settings?

Currently, the latest version of vscode also reduced the gutter size so maybe having just the gutter and no line or ruler visuals would be better for you?

        "coverage-gutters.showLineCoverage": {
          "type": "boolean",
          "default": false,
          "description": "show or hide the line coverage"
        },
        "coverage-gutters.showRulerCoverage": {
          "type": "boolean",
          "default": false,
          "description": "show or hide the ruler coverage"
        },
        "coverage-gutters.showGutterCoverage": {
          "type": "boolean",
          "default": true,
          "description": "show or hide the gutter coverage"
        },