(finding: dict[str, Any])
| 210 | |
| 211 | |
| 212 | def _locations(finding: dict[str, Any]) -> str: |
| 213 | rendered = [] |
| 214 | for location in finding["locations"]: |
| 215 | start = location["startLine"] |
| 216 | end = location.get("endLine", start) |
| 217 | suffix = f":{start}" if end == start else f":{start}-{end}" |
| 218 | rendered.append(f"{location['path']}{suffix}") |
| 219 | return ", ".join(rendered) |
| 220 | |
| 221 | |
| 222 | def _finding_sort_key(finding: dict[str, Any]) -> tuple[int, str, str]: |