feat(checker): add debug diagnostics

This commit is contained in:
2026-06-24 11:06:48 +02:00
parent dedfcb4dbb
commit 45f84a2f23
3 changed files with 9 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ class DiagnosticType(StrEnum):
ERROR = "Error"
WARNING = "Warning"
INFO = "Info"
DEBUG = "Debug"
@dataclass(frozen=True)

View File

@@ -61,3 +61,10 @@ class FileReporter:
location=location,
message=message,
)
def debug(self, location: Location, message: str):
self.report(
type=DiagnosticType.DEBUG,
location=location,
message=message,
)

View File

@@ -59,6 +59,7 @@ class DiagnosticPrinter:
DiagnosticType.ERROR: Ansi.RED,
DiagnosticType.WARNING: Ansi.YELLOW,
DiagnosticType.INFO: Ansi.CYAN,
DiagnosticType.DEBUG: Ansi.MAGENTA,
}.get(diagnostic.type, Ansi.WHITE)
subject: str = Ansi.FG(color) + line[start_offset:end_offset] + Ansi.RESET