(self, detections: Iterable[Detection])
| 357 | pp(self) |
| 358 | |
| 359 | def post_analysis(self, detections: Iterable[Detection]): |
| 360 | encoding = self.metadata.get("encoding") or "utf-8" |
| 361 | line_numbers = [d.line_no for d in detections if d.line_no is not None and d.line is None] |
| 362 | |
| 363 | lines = lookup_lines(self.str_location, line_numbers, encoding=encoding) |
| 364 | |
| 365 | for d in detections: |
| 366 | d.tags |= self.metadata["tags"] # Lookup if we can remove this |
| 367 | |
| 368 | if d.location is None: |
| 369 | d.location = str(self) |
| 370 | else: |
| 371 | d.location = self.strip(d.location) |
| 372 | |
| 373 | if d.scan_location is None: |
| 374 | d.scan_location = self |
| 375 | |
| 376 | if d.line is None: |
| 377 | line = lines.get(d.line_no) |
| 378 | d.line = line |
| 379 | |
| 380 | if d._metadata is None: |
| 381 | d._metadata = self.metadata |
| 382 | |
| 383 | if d._severity is None: |
| 384 | d._severity = get_severity(d) |
| 385 | |
| 386 | def is_renamed_file(self, other: ScanLocation, max_depth: Optional[int]=None) -> float: |
| 387 | max_depth = max_depth or get_diff_depth_limit() |
no test coverage detected