Diagnostic
- class Diagnostic
LSP compatible diagnostic structure.
Note that this does not capture the source document the diagnostic applies to, it is expected that this information is contextual and readily available without additional duplication.
Members defined in
Diagnostic(12 members)RWThe diagnostic’s code, which usually appear in the user interface.
RWAn optional property to describe the error code.
RWDeprecated or obsolete code.
RWUnused or unnecessary code.
RWThe diagnostic’s message. It usually appears in the user interface
RAn array of related diagnostic information.
RWThe segment at which the message applies, offsets are in UTF-8 characters
RWThe diagnostic’s severity.
RWA human-readable string describing the source of this diagnostic, e.g. ‘typescript’ or ‘super lint’.
Append new related diagnostic information.
Attributes
- property code_description: syside.CodeDescription | None
An optional property to describe the error code.
Requires the code field (above) to be present/not null.
An array of related diagnostic information.
E.g. when symbol-names within a scope collide all definitions can be marked via this property.
- property segment: syside.DocumentSegment
The segment at which the message applies, offsets are in UTF-8 characters
- property severity: syside.DiagnosticSeverity
The diagnostic’s severity.
- property source: str | None
A human-readable string describing the source of this diagnostic, e.g. ‘typescript’ or ‘super lint’.
It usually appears in the user interface.
Methods
- __init__(segment: syside.DocumentSegment, code: str | str, message: str, severity: syside.DiagnosticSeverity = DiagnosticSeverity.Error) None
Append new related diagnostic information.