class

Fluxion::DiagnosticCollector

Inherits Reference < Object

Accumulates diagnostics in the order they are found. Validation reports every problem in one pass rather than aborting at the first, because a profile with five typos should take one run to fix, not five.

Constructors

Instance methods

<<(diagnostic : Diagnostic) : Nil
Source
concat(others : Enumerable(Diagnostic)) : Nil
Source
diagnostics
Source
empty?
Source
error(path : String, message : String, hint : String | Nil = nil, rule : String | Nil = nil) : Nil
Source
errors
Source
errors?
Source
info(path : String, message : String, hint : String | Nil = nil, rule : String | Nil = nil) : Nil
Source
raise_if_failed!(strict : Bool = false) : Nil

Raises with everything collected so far when any diagnostic is an error. strict also fails on warnings, backing validate --strict.

Source
warning(path : String, message : String, hint : String | Nil = nil, rule : String | Nil = nil) : Nil
Source
warnings
Source