Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/cover: inconsistent NumStmt when //line clauses are used with Go 1.13.4 #35781
This seems to be the same as #27350 but still happens even after running
What version of Go are you using (
The problem seems to be that the cover tool assumes that all lines in a single input file correspond to a single input file. In this case the input file datemath.y.go is composed of different input files. The coverage tool is assigning some coverage information to line 89 of datemath.y and some to line 89 of yaccpar. The first problem is that the coverage information for those two different lines is being mixed together. The second more immediate problem is that line 89 of yaccpar is a for statement with multiple statements on the line, and line 89 of datemath.y is not. That causes the cover tool to report an inconsistency.
I think the correct fix has to involve somehow making the cover tool aware of multiple source files within a single input file. Or, alternatively, entirely ignoring
Sure, I'll see what I can do.…
On Fri, 13 Dec 2019, 03:09 Ian Lance Taylor, ***@***.***> wrote: I'm not sure. Want to look into it? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#35781?email_source=notifications&email_token=AAXFX67AOXOUAVB6VUQZZHTQYJOZ7A5CNFSM4JQTMWHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGXFF2Y#issuecomment-565072619>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAXFX6644LV6FC3BO6TJ5FLQYJOZ7ANCNFSM4JQTMWHA> .