DeprecatedTag
DeprecatedTag
Severity: warning | Type: LiquidHtml | Aliases: DeprecatedTags
This check is aimed at eliminating the use of deprecated Liquid tags. When a deprecated tag is used, the check reports the offense with the deprecation reason (if available) to help you migrate to the recommended alternative.
Examples
The list of deprecated tags comes from the Liquid documentation. When a tag is marked as deprecated there, every usage is reported with the deprecation reason and the recommended replacement (when available).
✗ Incorrect Code Example (Avoid using this):
{% hash_assign user['name'] = 'John' %}
The hash_assign tag is deprecated — the assign tag supports the same hash assignment syntax.
✓ Correct Code Example (Use this instead):
{% assign user['name'] = 'John' %}
Note that the {% include %} tag is not deprecated in platformOS (unlike Shopify Liquid): it is the supported way to run a partial in the caller's scope, e.g. helpers that redirect or set the response status of the including page. Prefer render for self-contained partials.
Configuration
The default configuration for this check:
DeprecatedTag:
enabled: true
severity: warning
Disabling This Check
Use the platformos-check-disable comment to suppress specific instances when migrating legacy code:
{% # platformos-check-disable DeprecatedTag %}
{% hash_assign user['name'] = 'John' %}
{% # platformos-check-enable DeprecatedTag %}