Merge source checker results into destination in-place.
(
destination: dict[str, CheckerResults],
source: dict[str, CheckerResults],
)
| 182 | |
| 183 | |
| 184 | def merge_checker_results( |
| 185 | destination: dict[str, CheckerResults], |
| 186 | source: dict[str, CheckerResults], |
| 187 | ) -> None: |
| 188 | """Merge source checker results into destination in-place.""" |
| 189 | for checker_name, source_results in source.items(): |
| 190 | if checker_name not in destination: |
| 191 | destination[checker_name] = source_results |
| 192 | continue |
| 193 | for file_path, file_violations in source_results.violations.items(): |
| 194 | for violation in file_violations.violations: |
| 195 | destination[checker_name].add_violation( |
| 196 | file_path, violation.line_number, violation.content |
| 197 | ) |
| 198 | |
| 199 | |
| 200 | def _violations_to_results( |
no test coverage detected