Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: coverage ignore comments #107

Closed
TiddoLangerak opened this issue Aug 3, 2017 · 1 comment
Closed

Feature request: coverage ignore comments #107

TiddoLangerak opened this issue Aug 3, 2017 · 1 comment

Comments

@TiddoLangerak
Copy link

TiddoLangerak commented Aug 3, 2017

Ideally I'd have a 100% flow coverage in my projects. However, this is usually not realistic, there are almost always parts of the code base that either can't be covered at all, or are extremely difficult to cover properly. As a result, we generally can't set the threshold to 100% for CI builds, we need to lower it to a somewhat arbitrary lower value. This has as the unintended side-effect that the build will now allow a non-zero percentage of unintended uncovered code as well.

It would therefore be very useful if we could somehow specify that certain parts of the code should not count towards coverage percentage, e.g. by using comments. For example:

/* flow-coverage ignore-next-line */
const y : any; 

const z : any; // flow-coverage-ignore-line

/* flow-coverage ignore-start */
const a : any; 
const b : any;
/* flow-coverage ignore-end */

The tool could still warn about missing coverage, but it just wouldn't count towards to threshold.

With something like this we would be able to set the threshold as 100% and explicitly opt-out of coverage where desired.

Would something like this be possible and desirable for this project?

@rpl
Copy link
Owner

rpl commented Oct 25, 2017

I just noticed that this is basically a dupe of #63

@rpl rpl closed this as completed Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants