--- title: UnusedDocParam description: Ensures LiquidDoc parameters provided are used within snippet files. source_url: html: https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param md: https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param.md --- ExpandOn this page * [Examples](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param#examples) * [Options](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param#options) * [Disabling this check](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param#disabling-this-check) # UnusedDocParam The parameters defined within the `doc` tag must be used within the scope of the variable. *** ## Examples The following examples contain code snippets that either fail or pass this check. ### ✗ Fail The following example shows `some_str` LiquidDoc parameter not being used within the snippet: ## snippets/snippet.liquid ```liquid {% doc %} @param {string} some_str @param {number} some_num {% enddoc %} {{ some_num }} ``` ### ✓ Pass The following example shows valid uses of LiquidDoc parameters: ## snippets/snippet.liquid ```liquid {% doc %} @param {string} some_str @param {number} some_num @param {boolean} some_bool {% enddoc %}
{% if some_bool %} {{ some_num | plus 5 }} {% endif %} ``` *** ## Options The following example contains the default configuration for this check: ```yaml UnusedDocParam: enabled: true severity: warning ``` | Parameter | Description | | - | - | | `enabled` | Whether this check is enabled. | | `severity` | The [severity](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration#check-severity) of the check. | *** ## Disabling this check Disabling this check isn't recommended. *** * [Examples](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param#examples) * [Options](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param#options) * [Disabling this check](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unused-doc-param#disabling-this-check)