
See screenshot. Am I missing something here or why does it show that it's uncovered?
Seems to be an issue with Flow itself: facebook/flow#2233
I only started noticing this after the latest update. There should be some setting to disable coverage reporting in-line.
Having the same issue almost everywhere in my app, at every line. Is there any way to disable coverage reporting, just as priyajeet suggested? Thanks
EDIT - my bad, I just needed to clic the flow coverage report again (in the status bar, "Flow: X%").
Has this problem been resolved? If you clic the flow coverage report again, then washed away use the flow almost disappears
What is the status on this issue? I seem to be seeing the same thing...
What is the "flow coverage report" and how do I click on it? After following Vince's link, I still don't understand.
ps -- Nevermind, I found it. I just needed to click on the blue status bar at the bottom of VSC.
The original issue (Shows "uncovered code" when it's covered) still relevant.
Clicking on the "Flow: X%" in the status bar only hide the issue by hiding the errors, but the coverage still under 100% on a file where everything is covered.
For me, [flow coverage] uncovered code false positives occurred when importing flow types from a file without //@flow.
I call them "false positives" because flow-bin does not report them, and I verified that flow-bin was correctly covering the code.
Adding //@flow to the imported files fixes the false positives.
So, the difference is that flow-for-vscode isn't able to get flow types from an imported file without //@flow, but flow-bin is able to get them.
This does work correctly when you use @flow annotation, unfortunately it is not when I try to use all=true option. It also works without LSP.
Here is LSP response:
[Trace - 4:50:55 PM] Received response 'textDocument/typeCoverage - (266)' in 5ms.
Result: {
"coveredPercent": 0,
"uncoveredRanges": [
{
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 1,
"character": 0
}
}
}
],
"defaultMessage": "Use @flow to get type coverage for this file"
}
It seems like LSP Flow server is not considering the all option in this case.
Most helpful comment
Having the same issue almost everywhere in my app, at every line. Is there any way to disable coverage reporting, just as priyajeet suggested? Thanks
EDIT - my bad, I just needed to clic the flow coverage report again (in the status bar, "Flow: X%").