I have reproduced the issue on the latest CLI version.
Yes, I am on the latest version
I have searched existing posts and this report is not a duplicate.
Yes, this isn’t a duplicate
In which of these areas are you experiencing a problem?
Theme
Expected behavior
shopify theme check should handle liquid within HTML comments, since Shopify’s server-side implementation seem to parse that normally in actual use (for example see #666 in the Liquid repo from way back when, matching my experience with a real theme too).
Actual behavior
The liquid code seems to be ignored, for example variables defined there result in a UndefinedObject warning when referenced later.
Reproduction steps
Create templates/page.test.liquid containing something like <!-- {% assign blah = 5 %} --> {{ blah }} and then run shopify theme check.
Verbose output
2026-01-10T17:00:42.516Z: Sync-reading the content of file at templates/page.test.liquid...
╭─ info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ templates/page.test.liquid │
│ │
│ │
│ [warning]: UndefinedObject │
│ Unknown object 'blah' used. │
│ │
│ 1 <!-- {% assign blah = 5 %} --> {{ blah }} │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Operating system
Mac OS Sonoma
CLI version
3.88.1
Shell
bash
Nodejs version
v25.2.1