UnrecognizedRenderSnippetArguments
All arguments provided when rendering a snippet must match the arguments defined in that snippet's LiquidDoc.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check. All examples refer to the following snippet that defines two parameters (one optional, indentified by square brackets; one required).
snippets/example-snippet.liquid
{% doc %}
@param {string} some_str
@param {number} [some_num]
{% enddoc %}
Anchor to ✗ Fail✗ Fail
In the following example, the snippet is being rendered with an unrecognized argument:
sections/section.liquid
{% render 'example-snippet', : 'text', : 1, : false %}
Anchor to ✓ Pass✓ Pass
In the following example, the snippet is being rendered with recognized argument:
sections/section.liquid
{% render 'example-snippet', : 'text', : 1 %}
Anchor to OptionsOptions
The following example contains the default configuration for this check:
UnrecognizedRenderSnippetArguments
enabledtrue
severity warning
Parameter | Description |
---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended.
Was this page helpful?