Class: ThemeCheck::ValidSchema
- Inherits:
-
LiquidCheck
- Object
- Check
- LiquidCheck
- ThemeCheck::ValidSchema
- Defined in:
- lib/theme_check/checks/valid_schema.rb
Constant Summary
Constants inherited from LiquidCheck
LiquidCheck::ATTR, LiquidCheck::HTML_ATTRIBUTE, LiquidCheck::HTML_ATTRIBUTES, LiquidCheck::QUOTED_LIQUID_ATTRIBUTE, LiquidCheck::START_OR_END_QUOTE, LiquidCheck::TAG, LiquidCheck::VARIABLE
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?, categories, #categories, category, #code_name, #doc, doc, docs_url, #ignore!, #ignored?, #severity, severity, #to_s, #unignore!
Methods included from JsonHelpers
Instance Method Details
#on_schema(node) ⇒ Object
8 9 10 11 12 |
# File 'lib/theme_check/checks/valid_schema.rb', line 8 def on_schema(node) JSON.parse(node.value.nodelist.join) rescue JSON::ParserError => e add_offense(format_json_parse_error(e), node: node) end |