abstract class AmberLSP::Rules::BaseRule

Direct Known Subclasses

Defined in:

amber_lsp/rules/base_rule.cr

Instance Method Summary

Instance Method Detail

abstract def applies_to : Array(String) #

[View source]
abstract def check(file_path : String, content : String) : Array(Diagnostic) #

[View source]
abstract def default_severity : Severity #

[View source]
abstract def description : String #

[View source]
def find_all_line_ranges(content : String, pattern : Regex) : Array(TextRange) #

Finds all line and character ranges for occurrences of a pattern.


[View source]
def find_line_range(content : String, pattern : Regex) : TextRange | Nil #

Finds the line and character range for the first occurrence of a pattern. Returns nil if the pattern is not found.


[View source]
abstract def id : String #

[View source]