| 615 | } |
| 616 | |
| 617 | record FileCheck(String name, Kind kind, GHContent content) |
| 618 | implements Information { |
| 619 | public String summary() { |
| 620 | // formatter:off |
| 621 | return "- %s %s - %s%s".formatted( |
| 622 | getMarker(), name, ok() ? "File exists" : "File does not exist", urlText(content)); |
| 623 | // formatter:on |
| 624 | } |
| 625 | |
| 626 | public String markdownSummary() { |
| 627 | return "- [%s] %s %s - %s%s" |
| 628 | .formatted((ok() ? "x" : " "), |
| 629 | getMarker(), name, ok() ? "File exists" : "File does not exist", urlText(content)); |
| 630 | } |
| 631 | |
| 632 | private String getMarker() { |
| 633 | return switch (kind) { |
| 634 | case MUST -> ok() ? "✅" : "❌"; |
| 635 | case SHOULD -> ok() ? "✅" : "⚠️"; |
| 636 | case BONUS -> "💚"; |
| 637 | }; |
| 638 | } |
| 639 | |
| 640 | boolean ok() { |
| 641 | return content != null; |
| 642 | } |
| 643 | } |
| 644 | |
| 645 | record CodeOwnerError( |
| 646 | int line, |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…