Format one issue as a compact single-line string for watch-mode diffs.
(issue, tag: str, tag_color: str)
| 352 | severity_map = {"LOW": 0, "MEDIUM": 1, "HIGH": 2, "CRITICAL": 3} |
| 353 | min_sev = severity_map[severity_level.upper()] |
| 354 | |
| 355 | return [ |
| 356 | issue for issue in raw_issues |
| 357 | if severity_map[str(issue.severity).split(".")[-1].upper()] >= min_sev |
| 358 | and issue.get_fingerprint() not in ignored_fingerprints |
| 359 | ] |
| 360 | |
| 361 | |
| 362 | def _fmt_watch_issue(issue, tag: str, tag_color: str) -> str: |
| 363 | """Format one issue as a compact single-line string for watch-mode diffs.""" |
| 364 | sev = str(issue.severity).split(".")[-1].upper() |
| 365 | return ( |
| 366 | click.style(f" {tag:<10}", fg=tag_color, bold=True) |
| 367 | + " " |