Homepage

UnusedDocParam

Last edit: Apr 01, 2026

UnusedDocParam

Severity: warning | Type: LiquidHtml

This check ensures that parameters defined in a partial's {% doc %} tag are actually used within the partial body. A declared but unused parameter is almost always a mistake — either the parameter name was misspelled in the template, or the {% doc %} declaration needs to be removed.

Examples

✗ Incorrect Code Example (Avoid using this):


{% doc %}
  @param {string} title - The card title
  @param {string} subtitle - The card subtitle
{% enddoc %}
<div class="card">
  <h2>{{ title }}</h2>
  {% comment %}subtitle is declared but never used{% endcomment %}
</div>

✓ Correct Code Example (Use this instead):

Either use the declared parameter:


{% doc %}
  @param {string} title - The card title
  @param {string} subtitle - The card subtitle
{% enddoc %}
<div class="card">
  <h2>{{ title }}</h2>
  <p>{{ subtitle }}</p>
</div>

Or remove the unused declaration:


{% doc %}
  @param {string} title - The card title
{% enddoc %}
<div class="card">
  <h2>{{ title }}</h2>
</div>

Configuration

The default configuration for this check:

UnusedDocParam:
  enabled: true
  severity: warning

Disabling This Check

This check is safe to disable if you use the {% doc %} tag primarily for documentation purposes and intentionally declare parameters that serve as documentation only.

Resources

Questions?

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

contact us