DuplicateFunctionArguments
Last edit: Apr 01, 2026
DuplicateFunctionArguments
Severity: warning | Type: LiquidHtml
This check ensures that no duplicate argument names are provided when invoking a partial as a function using the {% function %} tag. Duplicate argument names are almost always a mistake and can lead to unexpected behavior, since only one of the values will be used.
Examples
✗ Incorrect Code Example (Avoid using this):
{% function result = 'my_function', name: "Alice", name: "Bob" %}
The name argument is passed twice.
✓ Correct Code Example (Use this instead):
{% function result = 'my_function', name: "Alice" %}
Configuration
The default configuration for this check:
DuplicateFunctionArguments:
enabled: true
severity: warning
Disabling This Check
Disabling this check is not recommended. Duplicate arguments are always a mistake.