Diagnostic

case class Diagnostic(range: Range, severity: Opt[DiagnosticSeverity], code: Opt[Int | String], codeDescription: Opt[CodeDescription], source: Opt[String], message: String, tags: Opt[Vector[DiagnosticTag]], relatedInformation: Opt[Vector[DiagnosticRelatedInformation]], data: Opt[Value])

Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.

Value parameters:
code

The diagnostic's code, which usually appear in the user interface.

codeDescription

An optional property to describe the error code. Requires the code field (above) to be present/not null. since 3.16.0

data

A data entry field that is preserved between a textDocument/publishDiagnostics notification and textDocument/codeAction request. since 3.16.0

message

The diagnostic's message. It usually appears in the user interface

range

The range at which the message applies

relatedInformation

An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.

severity

The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error, warning, info or hint.

source

A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'. It usually appears in the user interface.

tags

Additional metadata about the diagnostic. since 3.15.0

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product