Class: ThemeCheck::SyntaxError
- Inherits:
-
LiquidCheck
- Object
- Check
- LiquidCheck
- ThemeCheck::SyntaxError
- Defined in:
- lib/theme_check/checks/syntax_error.rb
Overview
Report Liquid syntax errors
Constant Summary
Constants inherited from Check
Check::CATEGORIES, Check::SEVERITIES
Instance Attribute Summary
Attributes inherited from Check
Instance Method Summary collapse
Methods inherited from LiquidCheck
Methods included from ChecksTracking
Methods included from ParsingHelpers
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
Instance Method Details
#on_document(node) ⇒ Object
8 9 10 11 12 |
# File 'lib/theme_check/checks/syntax_error.rb', line 8 def on_document(node) node.template.warnings.each do |warning| add_exception_as_offense(warning, template: node.template) end end |
#on_error(exception) ⇒ Object
14 15 16 |
# File 'lib/theme_check/checks/syntax_error.rb', line 14 def on_error(exception) add_exception_as_offense(exception, template: theme[exception.template_name]) end |