(errout:str, c:set)
| 25 | |
| 26 | |
| 27 | def count_errors(errout:str, c:set): |
| 28 | for line in errout.split('\n'): |
| 29 | if not line.endswith(']'): |
| 30 | continue |
| 31 | res = re.match(r'^[^:]+:[0-9]+:[0-9]+: (error|warning|style|portability|performance):.*\[([a-zA-Z0-9_\-]+)\]$', line) |
| 32 | if res is None: |
| 33 | print('No warning? ' + line) |
| 34 | continue |
| 35 | severity = res.group(1) |
| 36 | c[severity] = c.get(severity, 0) + 1 |
| 37 | error_id = res.group(2) |
| 38 | c[error_id] = c.get(error_id, 0) + 1 |
| 39 | |
| 40 | |
| 41 | if __name__ == "__main__": |
no test coverage detected