UnrecognizedRenderPartialArguments
UnrecognizedRenderPartialArguments
Severity: warning | Type: LiquidHtml | Aliases: UnrecognizedRenderPartialParams
This check ensures that no unknown arguments are used when rendering a partial that has a {% doc %} tag. Passing arguments that the partial does not declare is likely a mistake — either the argument name is misspelled, or the partial's {% doc %} tag needs to be updated.
This check only runs when the target partial has a {% doc %} tag. For partials without a {% doc %} tag, see MetadataParamsCheck.
Examples
✗ Incorrect Code Example (Avoid using this):
{% comment %}app/views/partials/user/card.liquid{% endcomment %}
{% doc %}
@param {string} name - The user's display name
{% enddoc %}
<div>{{ name }}</div>
{% comment %}Calling site — 'avatar_url' is not declared in the partial's doc tag{% endcomment %}
{% render 'user/card', name: user.name, avatar_url: user.avatar %}
✓ Correct Code Example (Use this instead):
Either remove the unknown argument at the call site:
{% render 'user/card', name: user.name %}
Or declare the argument in the partial's {% doc %} tag:
{% doc %}
@param {string} name - The user's display name
@param {string} [avatar_url] - Optional avatar URL
{% enddoc %}
Configuration
The default configuration for this check:
UnrecognizedRenderPartialArguments:
enabled: true
severity: warning
Disabling This Check
This check can be disabled if you intentionally pass additional context to partials beyond what is declared in the {% doc %} tag.