forked from sguiheux/go-coverage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes_cobertura.go
82 lines (69 loc) · 2.51 KB
/
types_cobertura.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package coverage
import "encoding/xml"
type CoberturaCoverage struct {
XMLName xml.Name `xml:"coverage"`
LineRate string `xml:"line-rate,attr"`
BranchRate string `xml:"branch-rate,attr"`
LinesCovered string `xml:"lines-covered,attr"`
LinesValid string `xml:"lines-valid,attr"`
BranchesCovered string `xml:"branches-covered,attr"`
BranchesValid string `xml:"branches-valid,attr"`
Complexity string `xml:"complexity,attr"`
Version string `xml:"version,attr"`
Timestamp string `xml:"timestamp,attr"`
Sources CoberturaSources `xml:"sources"`
Packages CoberturaPackages `xml:"packages"`
}
type CoberturaSources struct {
Source []string `xml:"source"`
}
type CoberturaPackages struct {
Package []CoberturaPackage `xml:"package"`
}
type CoberturaPackage struct {
Name string `xml:"name,attr"`
LineRate string `xml:"line-rate,attr"`
BranchRate string `xml:"branch-rate,attr"`
Complexity string `xml:"complexity,attr"`
Classes CoberturaClasses `xml:"classes"`
}
type CoberturaClasses struct {
Class []CoberturaClass `xml:"class"`
}
type CoberturaClass struct {
Name string `xml:"name,attr"`
FileName string `xml:"filename,attr"`
LineRate string `xml:"line-rate,attr"`
BranchRate string `xml:"branch-rate,attr"`
Complexity string `xml:"complexity,attr"`
Methods CoberturaMethods `xml:"methods"`
Lines CoberturaLines `xml:"lines"`
}
type CoberturaMethods struct {
Method []CoberturaMethod `xml:"method"`
}
type CoberturaMethod struct {
Name string `xml:"name,attr"`
Signature string `xml:"signature,attr"`
LineRate string `xml:"line-rate,attr"`
BranchRate string `xml:"branch-rate,attr"`
Lines CoberturaLines `xml:"lines"`
}
type CoberturaLines struct {
Line []CoberturaLine `xml:"line"`
}
type CoberturaLine struct {
Number string `xml:"number,attr"`
Hits string `xml:"hits,attr"`
Branch string `xml:"branch,attr"`
ConditionCoverage string `xml:"condition-coverage,attr"`
Conditions []CoberturaConditions
}
type CoberturaConditions struct {
Condition []CoberturaCondition `xml:"conditions,attr"`
}
type CoberturaCondition struct {
Number string `xml:"number,attr"`
Type string `xml:"type,attr"`
Coverage string `xml:"coverage,attr"`
}