Skip to content

theme-check-vscode misses errors in snippet parameters #1094

@asuponev

Description

@asuponev

Current issue
When rendering a snippet using the render tag, theme-check-vscode does not report syntax or validation errors in snippet parameters.

For example, the following cases are not highlighted as errors in VS Code:
Passing an expression instead of a variable:

{%
  render 'test-snippet',
  card_index: forloop.index | modulo: 4,
%}

Invalid syntax, such as an extra trailing comma:

{%
  render 'test-snippet',
  card_index: forloop.index,,
%}

However, these errors are detected when submitting the theme to Shopify, where the validation fails immediately. This creates a mismatch between VS Code theme check and actual theme validation.

If parameters are passed to a snippet as an expression instead of a variable, the snippet still renders successfully in the theme, even though the theme archive fails validation on submit.

Because the snippet is not visible in VS Code due to an extra comma or expression instead of a variable, such a render is not validated in VS Code for issues like non-existent variables, which can lead to other problems. See the screenshot:

Image

Feature request
It would be helpful if theme-check-vscode highlighted invalid render tag usage directly in VS Code when:

  • A snippet is rendered with invalid Liquid syntax
  • An invalid or unsupported value (such as a Liquid expression) is passed as a snippet parameter

Additional context
This behavior can be confusing during development because the code appears valid in VS Code but fails only after submitting the theme. Improving validation for render parameters would help catch these issues earlier and keep local linting consistent with Shopify’s actual validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions