Table of Contents

Class AnalyzerFinding

Namespace
RDCore.SDK.Extensibility.Diagnostics
Assembly
RDCore.SDK.dll

One thing an analyzer has to say about a module.

public sealed record AnalyzerFinding : IEquatable<AnalyzerFinding>
Inheritance
AnalyzerFinding
Implements
Inherited Members

Constructors

AnalyzerFinding(RDCoreDiagnosticCode, SourceRange, DiagnosticSeverity, string)

One thing an analyzer has to say about a module.

public AnalyzerFinding(RDCoreDiagnosticCode Code, SourceRange Range, DiagnosticSeverity Severity, string Message)

Parameters

Code RDCoreDiagnosticCode

The code the diagnostic is reported under, with the prefix the analyzer's extension declares (RD-VBAL §1.1.4).

Range SourceRange

Where in the document it is.

Severity DiagnosticSeverity

How serious it is.

Message string

What is worth saying about it, in the language of the reader.

Properties

Code

The code the diagnostic is reported under, with the prefix the analyzer's extension declares (RD-VBAL §1.1.4).

public RDCoreDiagnosticCode Code { get; init; }

Property Value

RDCoreDiagnosticCode

Fixes

What can be done about the finding, which the platform offers as code actions (DiagnosticFixes); null when nothing is known to fix it.

public DiagnosticFixes? Fixes { get; init; }

Property Value

DiagnosticFixes

Message

What is worth saying about it, in the language of the reader.

public string Message { get; init; }

Property Value

string

Range

Where in the document it is.

public SourceRange Range { get; init; }

Property Value

SourceRange

The other places that the finding is about (LSP 3.17 DiagnosticRelatedInformation): one finding that stands for many of them - each line of a module that one change is to move - says where each of them is, and what it is, instead of being reported at each.

public IReadOnlyList<RelatedFinding> Related { get; init; }

Property Value

IReadOnlyList<RelatedFinding>

Severity

How serious it is.

public DiagnosticSeverity Severity { get; init; }

Property Value

DiagnosticSeverity

Tags

What the client is told about how to render the range (LSP 3.17 DiagnosticTag): Unnecessary for code that is dead, which a client renders faded, as it renders code that cannot be reached.

public IReadOnlyList<DiagnosticTag> Tags { get; init; }

Property Value

IReadOnlyList<DiagnosticTag>