class Reporter
Defined at line 20 of file ../../tools/fidl/fidlc/src/reporter.h
Public Methods
void Reporter ()
Defined at line 22 of file ../../tools/fidl/fidlc/src/reporter.h
void Reporter (const Reporter & )
Defined at line 23 of file ../../tools/fidl/fidlc/src/reporter.h
template <ErrorId Id, typename... Args>
bool Fail (const ErrorDef<Id, Args...> & def, SourceSpan span, const cpp20::type_identity_t<Args> &... args)
Defined at line 38 of file ../../tools/fidl/fidlc/src/reporter.h
void Report (std::unique_ptr<Diagnostic> diag)
Reports an error or warning.
std::vector<Diagnostic *> Diagnostics ()
Combines errors and warnings and sorts by (file, span).
void PrintReports (bool enable_color)
Prints a report based on Diagnostics() in text format, with ANSI color
escape codes if enable_color is true.
void PrintReportsJson ()
Prints a report based on Diagnostics() in JSON format.
template <ErrorId Id, typename... Args>
void Warn (const WarningDef<Id, Args...> & def, SourceSpan span, const cpp20::type_identity_t<Args> &... args)
Defined at line 47 of file ../../tools/fidl/fidlc/src/reporter.h
Counts Checkpoint ()
Creates a checkpoint. This lets you detect how many new errors
have been added since the checkpoint.
Defined at line 66 of file ../../tools/fidl/fidlc/src/reporter.h
std::string Format (std::string_view qualifier, SourceSpan span, std::string_view message, bool color)
Formats a diagnostic message for the command line, displaying the filename,
line, column, diagnostic kind, and the full line where the span occurs,
with the span indicated by an ASCII "squiggle" below it. Optionally adds
color via ANSI escape codes.
const std::vector<std::unique_ptr<Diagnostic>> & errors ()
Defined at line 67 of file ../../tools/fidl/fidlc/src/reporter.h
const std::vector<std::unique_ptr<Diagnostic>> & warnings ()
Defined at line 68 of file ../../tools/fidl/fidlc/src/reporter.h
void set_warnings_as_errors (bool value)
Defined at line 69 of file ../../tools/fidl/fidlc/src/reporter.h