| 643 | } |
| 644 | |
| 645 | record CodeOwnerError( |
| 646 | int line, |
| 647 | int column, |
| 648 | String source, |
| 649 | String kind, |
| 650 | String message, |
| 651 | String path, |
| 652 | String suggestion) { |
| 653 | public String summary() { |
| 654 | return "; " + String.join(", ", text()); |
| 655 | } |
| 656 | |
| 657 | public String markdownSummary() { |
| 658 | return "\n - " + String.join("\n ", text()); |
| 659 | } |
| 660 | |
| 661 | private List<String> text() { |
| 662 | List<String> text = new ArrayList<>(); |
| 663 | text.add("Path: %s".formatted(path)); |
| 664 | text.add("[Line: %d, Column: %d] %s".formatted(line, column, kind)); |
| 665 | text.add(""); |
| 666 | text.add(" " + source.trim()); |
| 667 | text.add(""); |
| 668 | if (message != null) { |
| 669 | text.addAll(List.of(("*Message*: " + message).split("\n"))); |
| 670 | text.add(""); |
| 671 | } |
| 672 | if (suggestion != null && !suggestion.equals(message)) { |
| 673 | text.addAll(List.of(("*Suggestion*: " + message).split("\n"))); |
| 674 | text.add(""); |
| 675 | } |
| 676 | return text; |
| 677 | } |
| 678 | } |
| 679 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…