MissingRenderPartialArguments
MissingRenderPartialArguments
Severity: error | Type: LiquidHtml | Aliases: MissingRenderPartialParams
This check ensures that all required @param arguments declared in a partial's {% doc %} tag are provided at the call site. It helps you catch missing required arguments at development time rather than at runtime.
A parameter is considered required when it is declared without square brackets around its name in the {% doc %} tag (e.g. @param {string} name is required, @param {string} [name] is optional).
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
@param {string} [avatar_url] - Optional avatar URL
{% enddoc %}
<div class="card">
<h2>{{ name }}</h2>
</div>
{% comment %}Calling site — required 'name' argument is missing{% endcomment %}
{% render 'user/card', avatar_url: user.avatar %}
✓ Correct Code Example (Use this instead):
{% render 'user/card', name: user.name, avatar_url: user.avatar %}
{% render 'user/card', name: user.name %}
Configuration
The default configuration for this check:
MissingRenderPartialArguments:
enabled: true
severity: error
Disabling This Check
Disabling this check is not recommended. If a parameter is truly optional, mark it with square brackets in the {% doc %} tag: @param {string} [param_name].