A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::flow::Diagnostic Struct Reference

One problem found in a flow. More...

#include <cpp/a11/flow/diagnostic.h>

Public Attributes

std::string code
 A stable dotted identifier, e.g.
 
Severity severity = Severity::kError
 
Family family = Family::kSyntax
 
Range range
 
std::string message
 One sentence, in the language's own terms, ending in a full stop.
 
std::string flow
 The flow the problem is in, where the text got far enough to say.
 
std::vector< Fix > fixes
 

Detailed Description

One problem found in a flow.

This is the unit every frontend renders: the CLI prints it, the JSON and SARIF writers serialise it, an editor turns it into a squiggle and an Alt+Enter. Nothing downstream composes messages of its own, which is what keeps the wording of a language problem in one place.

Member Data Documentation

◆ code

std::string a11::flow::Diagnostic::code

A stable dotted identifier, e.g.

flow.stage.unknown. Part of the contract: a toolchain may match on it, and it does not change with the wording of the message. See [KnownCodes].

◆ family

Family a11::flow::Diagnostic::family = Family::kSyntax

◆ fixes

std::vector<Fix> a11::flow::Diagnostic::fixes

◆ flow

std::string a11::flow::Diagnostic::flow

The flow the problem is in, where the text got far enough to say.

◆ message

std::string a11::flow::Diagnostic::message

One sentence, in the language's own terms, ending in a full stop.

◆ range

Range a11::flow::Diagnostic::range

◆ severity

Severity a11::flow::Diagnostic::severity = Severity::kError

The documentation for this struct was generated from the following file: