Class: ThemeCheck::LiquidCheck

Inherits:
Check
  • Object
show all
Extended by:
ChecksTracking
Includes:
ParsingHelpers
Defined in:
lib/theme_check/liquid_check.rb

Constant Summary

Constants inherited from Check

Check::CATEGORIES, Check::SEVERITIES

Instance Attribute Summary

Attributes inherited from Check

#offenses, #options, #theme

Instance Method Summary collapse

Methods included from ChecksTracking

inherited

Methods included from ParsingHelpers

#outside_of_strings

Methods inherited from Check

all, can_disable, #can_disable?, category, #category, #code_name, doc, #doc, #ignore!, #ignored?, #severity, severity, #to_s, #unignore!

Methods included from JsonHelpers

#format_json_parse_error

Instance Method Details

#add_offense(message, node: nil, template: node&.template, markup: nil, line_number: nil, &block) ⇒ Object



9
10
11
# File 'lib/theme_check/liquid_check.rb', line 9

def add_offense(message, node: nil, template: node&.template, markup: nil, line_number: nil, &block)
  offenses << Offense.new(check: self, message: message, template: template, node: node, markup: markup, line_number: line_number, correction: block)
end