| 202 | |
| 203 | |
| 204 | class Group(CompilationData): |
| 205 | def __init__(self, name, regexp_string): |
| 206 | super().__init__(0, 0, 0, 0) |
| 207 | self.name = name |
| 208 | self.count = 0 |
| 209 | self.regexp = re.compile(regexp_string) |
| 210 | |
| 211 | def account(self, unit): |
| 212 | if (self.regexp.match(unit.file)): |
| 213 | self.loc += unit.loc |
| 214 | self.in_bytes += unit.in_bytes |
| 215 | self.expanded += unit.expanded |
| 216 | self.expanded_bytes += unit.expanded_bytes |
| 217 | self.count += 1 |
| 218 | |
| 219 | def to_string(self, name_width): |
| 220 | return "{:<{}} ({:>5} files): {}".format( |
| 221 | self.name, name_width, self.count, super().to_string()) |
| 222 | |
| 223 | |
| 224 | def SetupReportGroups(): |
no outgoing calls
no test coverage detected
searching dependent graphs…