MCPcopy Create free account
hub / github.com/commonhaus/foundation / CodeOwnerError

Class CodeOwnerError

templates/panda/PolicyPanda.java:645–678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…