-
Notifications
You must be signed in to change notification settings - Fork 42
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
No annotation, no coverage #102
Conversation
When calculating coverage for a project, I don't care about coverage in files that don't have the `@flow` pragma. While it's nice that Flow infers types anyway, since it's never going to report an error it doesn't help me at all and is potentially misleading. For example, my project is 75% covered with master, but only 34% covered with this change. This PR changes flow-coverage-report to ignore coverage in unannotated files. This could be considered a breaking change or a bugfix - I'm not sure. You might consider making this a configuration option. Resolves rpl#85
@dmnd Yeah, I definitely agree. When @ryan953 contributed the The following can be a reasonable behavior:
|
That sounds pretty good to me @rpl 👍 |
I'd use "no annotation, no coverage" mode because I have a long term goal of getting to 100% coverage everywhere. |
This would be very useful for me as well. Are there plans to merge this soon, @dmnd? It seems like the only thing blocking this is a broken test. I'd happy to fix/add the tests for this. |
@arjun-menon I don't have time to make the changes @rpl suggested and fix the broken test. I've just been using my fork to measure Flow coverage in my project. I'd really appreciate you taking this over and landing it! ❤️ |
Closing in favor of #141 (which also include a new test case) |
When calculating coverage for a project, I don't care about coverage in
files that don't have the
@flow
pragma. While it's nice that Flowinfers types anyway, since it's never going to report an error it
doesn't help me at all and is potentially misleading. For example, my
project is 75% covered with master, but only 34% covered with this
change.
This PR changes flow-coverage-report to ignore coverage in unannotated
files. This could be considered a breaking change or a bugfix - I'm not
sure. You might consider making this a configuration option.
Resolves #85