You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently go coverage computes coverage per package. You can use -coverpkg to get coverage to also include cross-package calls, but reported coverage is still per package.
I would suggest to add a flag like -total to tool covdata percent to compute coverage across all packages (potentially still restricted using -pkg). Literally, "number of lines of code called during tests across all packages" / "number of lines of code across all packages".
The text was updated successfully, but these errors were encountered:
seankhliao
changed the title
proposal: cmd/go: add support to "tool covdata percent" to compute total coverage over all packages
proposal: cmd/covdata: support computing total coverage over all packages
Mar 24, 2024
Proposal Details
Currently go coverage computes coverage per package. You can use
-coverpkg
to get coverage to also include cross-package calls, but reported coverage is still per package.I would suggest to add a flag like
-total
totool covdata percent
to compute coverage across all packages (potentially still restricted using-pkg
). Literally, "number of lines of code called during tests across all packages" / "number of lines of code across all packages".The text was updated successfully, but these errors were encountered: