diff --git a/midas/checker/diagnostic.py b/midas/checker/diagnostic.py index f4b3d12..233dd74 100644 --- a/midas/checker/diagnostic.py +++ b/midas/checker/diagnostic.py @@ -9,6 +9,7 @@ class DiagnosticType(StrEnum): ERROR = "Error" WARNING = "Warning" INFO = "Info" + DEBUG = "Debug" @dataclass(frozen=True) diff --git a/midas/checker/reporter.py b/midas/checker/reporter.py index b68766a..b61b8f3 100644 --- a/midas/checker/reporter.py +++ b/midas/checker/reporter.py @@ -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, + ) diff --git a/midas/cli/utils.py b/midas/cli/utils.py index 793d4e1..6cc7d38 100644 --- a/midas/cli/utils.py +++ b/midas/cli/utils.py @@ -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