(fp)
| 18 | buffer = [] |
| 19 | |
| 20 | def parse_line(fp): |
| 21 | for line in fp: |
| 22 | if isinstance(line, bytes): |
| 23 | line = line.decode("UTF-8") |
| 24 | if "warnings summary (final)" in line: |
| 25 | continue |
| 26 | # This means we are outside the body of a warning |
| 27 | elif not line.startswith(" "): |
| 28 | # process a single warning and move it to `selected_warnings`. |
| 29 | if len(buffer) > 0: |
| 30 | warning = "\n".join(buffer) |
| 31 | # Only keep the warnings specified in `targets` |
| 32 | if any(f": {x}: " in warning for x in targets): |
| 33 | selected_warnings.add(warning) |
| 34 | buffer.clear() |
| 35 | continue |
| 36 | else: |
| 37 | line = line.strip() |
| 38 | buffer.append(line) |
| 39 | |
| 40 | if from_gh: |
| 41 | for filename in os.listdir(artifact_path): |
no test coverage detected