struct

Ignorelint::LintResult

Inherits Struct < Value < Object

The result of linting one file.

Contains both the discovered issues and the parsed patterns. The patterns are kept so the CLI can use them for auto-fixing (fixes need access to the Pattern structs, not just the issues).

This is a struct (value type) because it is created once per file and never mutated after construction.

Constructors

new(issues : Array(Issue) = [] of Issue, patterns : Array(Pattern) = [] of Pattern)

Instance methods

collect_fixes(content_lines : Array(String)) : Tuple(Array(Fix), Fixer::SortFix | Nil)

Convenience: delegate fix collection to Fixer.

The CLI calls this when --fix is active. It bridges the lint result to the fixer without the CLI needing to pass issues and patterns separately.

issues

All issues found during linting, sorted by line number.

ok?

True when no issues were found (the file is clean).

patterns

All patterns parsed from the file (including blanks and comments).