Diagnostic

class Diagnostic(val ruleId: QualifiedRuleId, val severity: Severity, val message: String, val file: SourceFile?, val range: SourceRange?, val database: DatabaseContext?, val fixes: List<Fix> = emptyList())

Diagnostic resolved by the engine and passed to reporters.

Rules should emit RuleDiagnostic. The constructor is public only so core, reporter tests, and other sqldelight-check modules can share the resolved representation across Gradle module boundaries.

Constructors

Link copied to clipboard
constructor(ruleId: QualifiedRuleId, severity: Severity, message: String, file: SourceFile?, range: SourceRange?, database: DatabaseContext?, fixes: List<Fix> = emptyList())

Properties

Link copied to clipboard

Database context associated with the diagnostic when known.

Link copied to clipboard

File where the diagnostic occurred.

Link copied to clipboard
val fixes: List<Fix>

Optional fixes for the diagnostic.

Link copied to clipboard

User-facing message.

Link copied to clipboard

Source range where the diagnostic occurred.

Link copied to clipboard

Rule ID responsible for the diagnostic when available.

Link copied to clipboard

Resolved severity.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String