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: str | str
The diagnostic’s code, which usually appear in the user interface.
- property code_description: syside.CodeDescription | None
An optional property to describe the error code.
Requires the code field (above) to be present/not null.
- property is_deprecated: bool
Deprecated or obsolete code.
- property is_unnecessary: bool
Unused or unnecessary code.
- property message: str
The diagnostic’s message. It usually appears in the user interface
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
- __str__() str
Append new related diagnostic information.