Homepage

MetadataParamsCheck

Last edit: Apr 01, 2026

MetadataParamsCheck

Severity: error | Type: LiquidHtml

This check ensures that parameters referenced when calling {% render %} or {% function %} tags exist in the target partial. It works by inspecting the called partial and determining which variables it expects:

  • If the partial has a {% doc %} tag, only the parameters declared in @param entries are considered valid. Required parameters (not marked @param {type} [name] with brackets) must be provided.
  • If the partial has no {% doc %} tag, the check scans for undefined variables in the partial body and treats them as implicitly required parameters.

This check is complementary to MissingRenderPartialArguments and UnrecognizedRenderPartialArguments, which rely on explicit {% doc %} declarations.

Examples

✗ Incorrect Code Example (Avoid using this):


{% comment %}app/views/partials/greeting.liquid{% endcomment %}
<h1>Hello, {{ name }}!</h1>


{% comment %}Calling site — 'name' is required but not passed{% endcomment %}
{% render 'greeting' %}

✓ Correct Code Example (Use this instead):


{% render 'greeting', name: current_user.name %}

Configuration

The default configuration for this check:

MetadataParamsCheck:
  enabled: true
  severity: error

Disabling This Check

This check can be disabled for partials where dynamic variable passing is intentional and cannot be statically analyzed.

Resources

Questions?

We are always happy to help with any questions you may have.

contact us