struct

Krikri::Lint::Violation

Inherits Struct < Value < Object

Constructors

new(path : String, line : Int32, column : Int32, rule_id : String, severity : Krikri::Lint::Severity, message : String, task_line : Int32 | Nil = nil, warning : Bool = false, details : String = "", level : String | Nil = nil)
Source

Class methods

to_json(violations : Array(Violation)) : String
Source

Instance methods

as_warning
Source
column
Source
details

Upstream's MatchError.details: the enclosing task's description, rendered as "Task/Handler: <name>" for matches produced by a task-scoped rule. Empty for file-level rules (yaml[*]).

Source
family

Rule family: "yaml[commas]" -> "yaml". The summary table and the profile lookups key on the family for bracketed sub-tags.

Source
level

Upstream's MatchError.level. Display level only: a match can be shown as a warning (load-failure) while still counting as a failure for the outcome line and the exit code.

Source
line
Source
message
Source
path
Source
position

Upstream's MatchError.position: "line", or "line:column" when the rule reported one.

Source
report_key

Upstream's MatchError._hash_key: the key the --fix yaml re-run uses to decide a match was "still found" in the rewritten file.

Source
rule_id
Source
severity
Source
task_line

Enclosing task's first line, for noqa range matching. Nil for file-level rules (yaml[*], load-failure).

Source
warning?
Source
with_details(details : String) : Violation
Source