(
f: str,
info: dict[str, Any],
emoji: bool = False,
add_tag: bool = True,
add_marker: bool = False,
category_only: bool = True,
)
| 585 | |
| 586 | |
| 587 | def _render_file_line( |
| 588 | f: str, |
| 589 | info: dict[str, Any], |
| 590 | emoji: bool = False, |
| 591 | add_tag: bool = True, |
| 592 | add_marker: bool = False, |
| 593 | category_only: bool = True, |
| 594 | ) -> str: |
| 595 | # Optional, single marker only |
| 596 | marker = "" |
| 597 | if add_marker: |
| 598 | if info.get("full_triggers"): |
| 599 | marker = "⚠️ " if emoji else "" |
| 600 | elif info.get("lint_only"): |
| 601 | marker = "🧹 " if emoji else "" |
| 602 | elif not info.get("categories"): |
| 603 | marker = "❓ " if emoji else "" |
| 604 | |
| 605 | tags = [] |
| 606 | if add_tag: |
| 607 | if info.get("categories"): |
| 608 | header = "🏷️ " if emoji else "Category match :" |
| 609 | tags.append(f"{header} " + ", ".join(info["categories"])) |
| 610 | if info.get("full_triggers") and not category_only: |
| 611 | header = "🚨 " if emoji else "Full triggers" |
| 612 | tags.append(f"{header} " + ", ".join(info["full_triggers"])) |
| 613 | if info.get("lint_only") and not category_only: |
| 614 | header = "🧹 " if emoji else "Lint-only :" |
| 615 | tags.append(f"{header}") |
| 616 | |
| 617 | tag_str = (" — " + " | ".join(tags)) if tags else "" |
| 618 | return f"- {marker}`{f}`{tag_str}" |
| 619 | |
| 620 | |
| 621 | def _enabled_lane_names(res: SelectorResult) -> list[str]: |
no test coverage detected