Orphaned Snippet
Identifies snippets that exist but are never referenced in the theme.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
This snippet exists but is never referenced.
snippets/unused-snippet.liquid
<div class="orphaned-content">
This content will never be displayed
</div>
Anchor to ✓ Pass✓ Pass
This snippet is properly referenced somewhere in the theme.
snippets/used-snippet.liquid
<div class="active-content">
This content is used
</div>
templates/index.liquid
{% render 'used-snippet' %}
Anchor to OptionsOptions
The following example contains the default configuration for this check:
OrphanedSnippet
enabledtrue
severitywarning
| Parameter | Description |
|---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
This check is safe to disable.
Was this page helpful?