class

Krikri::Lint::FixBuffer

Inherits Reference < Object

Line-edit buffer for autofixes. All fixes operate on the file's original line numbers: edits are spans within existing lines, whole-line deletions, or the final-newline flag. Nothing may insert or remove lines before the end, so violation coordinates stay valid for the whole fix pass.

Constructors

new(source : String)
Source

Instance methods

add_final_newline
Source
add_trailing_newline
Source
changed?
Source
delete_line(line : Int32) : Nil
Source
deleted
Source
deleted=(deleted : Array(Bool))
Source
had_trailing_newline?
Source
line_text(line : Int32) : String | Nil
Source
lines
Source
replace_span(line : Int32, column : Int32, length : Int32, replacement : String) : Bool

Replaces length bytes starting at column (1-based) on line with replacement. Returns false when the span is out of bounds.

Source
result
Source