struct Diagnostic

Overview

Diagnostic record produced by a ConventionRule#check call.

The runner serializes diagnostics as one line each in the format: <file>:<line>: [<rule_name>] <message> (suggested: <fix>)

Defined in:

lsp_rules/convention_rule.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(file_path : String, line : Int32, rule_name : String, message : String, suggested_fix : String | Nil = nil) #

[View source]

Instance Method Detail

def file_path : String #

[View source]
def file_path=(file_path : String) #

[View source]
def line : Int32 #

[View source]
def line=(line : Int32) #

[View source]
def message : String #

[View source]
def message=(message : String) #

[View source]
def rule_name : String #

[View source]
def rule_name=(rule_name : String) #

[View source]
def suggested_fix : String | Nil #

[View source]
def suggested_fix=(suggested_fix : String | Nil) #

[View source]
def to_s(io : IO) : Nil #

Renders the diagnostic in the runner's stable human + machine format.


[View source]