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

Class FileCheck

templates/panda/PolicyPanda.java:617–643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,

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…