diagnostic
diagnostic
¶
Container for diagnostic info.
Location
¶
Bases: FrozenGeneralModel
Represents a location inside a resource, such as a line inside a text file.
Source code in src\pygerber\gerberx3\linter\diagnostic.py
to_lspt
¶
DiagnosticRelatedInformation
¶
Bases: FrozenGeneralModel
Represents a related message and source code location for a diagnostic. This should be used to point to code locations that cause or related to a diagnostics, e.g when duplicating a symbol in a scope.
Source code in src\pygerber\gerberx3\linter\diagnostic.py
CodeDescription
¶
Bases: FrozenGeneralModel
Structure to capture a description for an error code.
@since 3.16.0
Source code in src\pygerber\gerberx3\linter\diagnostic.py
DiagnosticSeverity
¶
Bases: int
, Enum
The diagnostic's severity.
Source code in src\pygerber\gerberx3\linter\diagnostic.py
to_lspt
¶
Range
¶
Bases: FrozenGeneralModel
A range in a text document expressed as (zero-based) start and end positions.
If you want to specify a range that contains a line including the line ending character(s) then use an end position denoting the start of the next line. For example:
Source code in src\pygerber\gerberx3\linter\diagnostic.py
to_lspt
¶
DiagnosticTag
¶
Bases: int
, Enum
The diagnostic tags.
@since 3.15.0
Source code in src\pygerber\gerberx3\linter\diagnostic.py
Unnecessary
class-attribute
instance-attribute
¶
Unused or unnecessary code.
Clients are allowed to render diagnostics with this tag faded out instead of having an error squiggle.
Deprecated
class-attribute
instance-attribute
¶
Deprecated or obsolete code.
Clients are allowed to rendered diagnostics with this tag strike through.
to_lspt
¶
Diagnostic
¶
Bases: FrozenGeneralModel
Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.
Source code in src\pygerber\gerberx3\linter\diagnostic.py
message
instance-attribute
¶
The diagnostic's message. It usually appears in the user interface
severity
class-attribute
instance-attribute
¶
The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error, warning, info or hint.
code
class-attribute
instance-attribute
¶
The diagnostic's code, which usually appear in the user interface.
code_description
class-attribute
instance-attribute
¶
An optional property to describe the error code. Requires the code field (above) to be present/not null.
@since 3.16.0
source
class-attribute
instance-attribute
¶
A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'. It usually appears in the user interface.
tags
class-attribute
instance-attribute
¶
Additional metadata about the diagnostic.
@since 3.15.0
related_information
class-attribute
instance-attribute
¶
An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.
data
class-attribute
instance-attribute
¶
A data entry field that is preserved between a textDocument/publishDiagnostics
notification and textDocument/codeAction
request.
@since 3.16.0
to_lspt
¶
Repack into language server protocol type.