Reports deeply nested render
tags (or deprecated include
tags).
This check is aimed at eliminating excessive nesting of snippets.
👎 Examples of incorrect code for this check:
{% # templates/index.liquid %}
{% render 'one' %}
{% # snippets/one.liquid %}
{% render 'two' %}
{% # snippets/two.liquid %}
{% render 'three' %}
{% # snippets/three.liquid %}
{% render 'four' %}
{% # snippets/four.liquid %}
ok
👍 Examples of correct code for this check:
{% # templates/index.liquid %}
{% render 'one' %}
{% # snippets/one.liquid %}
{% render 'two' %}
{% # snippets/two.liquid %}
ok
The default configuration for this check is the following:
NestedSnippet:
enabled: true
max_nesting_level: 3
The max_nesting_level
option (Default: 2
) determines the maximum depth of snippets rendering snippets.
It's safe to disable this rule.
This check has been introduced in Theme Check 0.1.0.