This check prevents errors by making sure that no undefined variables are being used
This check is aimed at eliminating undefined object errors.
👎 Examples of incorrect code for this check:
{% assign greetings = "Hello" %}
{% if greeting == "Hello" %}
{{ articl }}
{{ prodcut }}
👍 Examples of correct code for this check:
{% assign greetings = "Hello" %}
{% if greetings == "Hello" %}
{{ article }}
{{ product }}
The default configuration for this check is the following:
UndefinedObject:
enabled: true
exclude_snippets: true
The exclude_snippets
(Default: true
) option determines whether to check for undefined objects in snippets file (as objects may be defined as arguments)
It is discouraged to disable this rule.
This check has been introduced in Theme Check 0.1.0.