{"modulePath":"github.com/target/pull-request-code-coverage","version":"v0.0.0-20260625151635-6061e1a4224c","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package pythoncov\n\nPackage pythoncov reads coverage.py XML reports (the format produced by \\`coverage xml\\` and pytest-cov's --cov-report=xml). That XML follows the Cobertura schema, but unlike the cobertura loader this one matches purely on the repo-relative file path and ignores the absolute \\\u003csource\u003e root, so a typical pytest project run from the repo root works without pointing PARAMETER\\_SOURCE\\_DIRS at an absolute build path.\n\n## Types\n\n```go\ntype Class struct {\n\tXMLName xml.Name `xml:\"class\"`\n\n\tFilename string `xml:\"filename,attr\"`\n\tLines    []Line `xml:\"lines\u003eline\"`\n}\n```\n\n```go\ntype DefaultLoader struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewReportLoader() *DefaultLoader\n```\n\n```go\nfunc (l *DefaultLoader) Load(coverageFile string) (coverage.Report, error)\n```\n\n```go\ntype Line struct {\n\tXMLName xml.Name `xml:\"line\"`\n\n\tNumber int `xml:\"number,attr\"`\n\tHits   int `xml:\"hits,attr\"`\n}\n```\n\n```go\ntype Package struct {\n\tXMLName xml.Name `xml:\"package\"`\n\n\tClasses []Class `xml:\"classes\u003eclass\"`\n}\n```\n\n```go\ntype Report struct {\n\tXMLName xml.Name `xml:\"coverage\"`\n\n\tPackages []Package `xml:\"packages\u003epackage\"`\n}\n```\n\n```go\nfunc (r *Report) GetCoverageData(module string, sourceDir string, pkg string, fileName string, lineNumber int) (*domain.CoverageData, bool)\n```\n\n","path":"github.com/target/pull-request-code-coverage/internal/plugin/coverage/pythoncov","name":"pythoncov","synopsis":"Package pythoncov reads coverage.py XML reports (the format produced by `coverage xml` and pytest-cov's --cov-report=xml).","isRedistributable":true}
