(
results: dict[str, CheckerResults],
)
| 211 | |
| 212 | |
| 213 | def _canonical_results( |
| 214 | results: dict[str, CheckerResults], |
| 215 | ) -> set[tuple[str, str, int, str]]: |
| 216 | canonical: set[tuple[str, str, int, str]] = set() |
| 217 | for checker_name, checker_results in results.items(): |
| 218 | for file_path, file_violations in checker_results.violations.items(): |
| 219 | normalized_path = str(Path(file_path)).replace("\\", "/") |
| 220 | for violation in file_violations.violations: |
| 221 | canonical.add( |
| 222 | ( |
| 223 | checker_name, |
| 224 | normalized_path, |
| 225 | violation.line_number, |
| 226 | violation.content, |
| 227 | ) |
| 228 | ) |
| 229 | return canonical |
| 230 | |
| 231 | |
| 232 | def _print_diff_sample(label: str, values: set[tuple[str, str, int, str]]) -> None: |
no test coverage detected