Skip to main content

Checks reference

You can run the following checks as part of Theme Check. Each check identifies a specific error or a place in your code where a best practice is not being followed.

To learn more about the check and its options, click on the name of the check.


These checks analyze the style and validity of Liquid code. Some of these checks support auto-correction using the --auto-correct flag.

CheckSeverityPurposeAuto-correction
AppBlockValidTagsErrorIdentifies forbidden Liquid tags in theme app extension app block and app embed block code.
AssetPreloadWarningEncourages preloading of assets using Liquid filters, rather than HTML attributes.
AssetSizeAppBlockCSSErrorPrevents theme app extensions from using CSS files larger than the configured threshold.
AssetSizeAppBlockJavascriptErrorPrevents theme app extensions from using JavaScript files and external scripts with a compressed size larger than the configured threshold.
AssetSizeCSSErrorPrevents themes from using CSS files larger than the configured threshold.
AssetSizeJavaScriptErrorPrevents using theme JavaScript files and external scripts with a compressed size greater than the configured threshold.
BlockIdUsageWarningWarns against the use of block IDs in conditional statements and case statements.
CdnPreconnectWarningThis check is aimed at signaling the redundant preconnect to Shopify's CDN.
ContentForHeaderModificationErrorIdentifies code that tries to parse content_for_header .
DeprecateBgsizesWarningDiscourages use of the bgset extension instead of the image-set attribute for loading background images.
DeprecateLazysizesWarningDiscourages use of the lazysizes library for lazy loading images, iframes, and scripts.
DeprecatedFilterWarningDiscourages using deprecated filters in themes.Yes
DeprecatedFontsOnSectionsAndBlocksWarningDiscourages using deprecated fonts in section and block schemas.
DeprecatedFontsOnSettingsSchemaWarningDiscourages using deprecated fonts in the settings_schema.json file.
DeprecatedTagErrorDiscourages using deprecated tags in themes.
DuplicateContentForArgumentsWarningIdentifies when argument names provided for the content_for tag are not unique.
DuplicateRenderSnippetArgumentsWarningIdentifies when argument names provided for the render tag are not unique.
EmptyBlockContentWarningDetects instances where the Liquid tag {% content_for 'blocks' %} is used when the associated schema blocks array is empty or undefined.
HardcodedRoutesWarningEncourages use of the routes object instead of hardcoding URLs.
ImgWidthAndHeightErrorEnforces setting the width and height attributes on img tags.
LiquidFreeSettingsWarningIdentifies when a theme is using the {% liquid %} tag within Settings values.
LiquidHTMLSyntaxErrorErrorIdentifies Liquid and HTML syntax errors.
MissingAssetErrorMakes sure that all asset files referenced by the asset_url filter exist.
AppBlockMissingSchemaErrorEnsures schema is present in app blocks in theme app extensions.
MissingContentForArgumentsWarningIdentifies when required arguments are not provided when using a content_for tag.
MissingRenderSnippetArgumentsWarningIdentifies when required arguments are not provided when using a render tag.
MissingTemplateWarningIdentifies when a resource is referenced using a render , section , or include tag, but doesn't exist.Yes
PaginationSizeWarningEnsures that objects are paginated with performant sizes so too many objects are not loaded at once.
ParserBlockingJavaScriptErrorIdentifies script tags that don't have defer or async attributes, avoiding parser-blocking JavaScript.
RemoteAssetWarningDiscourages use of third party domains for hosting assets.
RequiredLayoutThemeObjectErrorMakes sure that the theme.liquid layout file contains the required {{ content_for_header }} and {{ content_for_layout }} objects.Yes
SchemaPresetsBlockOrderWarningMakes sure that the section and block schema presets are correctly used in the block_order.
SchemaPresetsStaticBlocksErrorWarns if a preset static block doesn't have a {% content_for "block" ... %} tag in the Liquid code.
StaticStylesheetAndJavascriptTagsErrorWarns if Liquid code is used inside a {% stylesheet %} or {% javascript %} tag.
TranslationKeyExistsErrorIdentifies references to translations that don't exist.
UnclosedHTMLElementErrorIdentifies instances of unclosed HTML elements in branching code.
UndefinedObjectErrorIdentifies references to undefined Liquid objects.
UniqueStaticBlockIdErrorIdentifies when two static blocks are using the same ID.
UnknownFilterErrorIdentifies references to unknown Liquid filters.
UnusedAssignWarningIdentifies variable definitions that aren't used.
UniqueDocParamNamesErrorIdentifies when parameter names in LiquidDoc are not unique.
UnrecognizedContentForArgumentsWarningIdentifies when unknown arguments for a static block are provided when using a content_for tag.
UnrecognizedRenderSnippetArgumentsWarningIdentifies when unknown arguments for a snippet are provided when using a render tag.
UnsupportedDocTagErrorIdentifies when LiquidDoc tag is used outside of snippets.
UnusedDocParamWarningIdentifies when parameters are defined within LiquidDoc, but are not used within the snippet.
ValidBlockTargetErrorIdentifies when a block is using an invalid target.
ValidContentForArgumentsErrorIdentifies invalid arguments passed to the {% content_for %} tag
ValidContentForArgumentTypesWarningIdentifies when arguments are provided when using a content_for tag, but the types of the arguments don't match the type defined in the block's LiquidDoc.
ValidDocParamNamesWarningIdentifies when parameter names within LiquidDoc collide with reserved liquid keywords.
ValidDocParamTypesErrorIdentifies when invalid parameter types exist in LiquidDoc.
ValidLocalBlocksErrorIdentifies when a local block is used incorrectly.
ValidRenderSnippetArgumentTypesWarningIdentifies when arguments are provided when using a render tag, but the types of the arguments don't match the type defined in the snippet's LiquidDoc.
ValidSchemaWarningIdentifies invalid JSON in {% schema %} tags.
ValidSchemaNameErrorIdentifies invalid values for the schema name property.
ValidSettingsKeyErrorIdentifies when preset settings key, default settings key, or referenced block setting key is defined in their respective schema.
ValidStaticBlockTypeErrorIdentifies when a static block is using an invalid type.
VariableNameWarningIdentifies variable names that don't adhere to a selected naming convention.

These checks analyze the syntax, content and structure of JSON files.

CheckSeverityPurposeAuto-correction
JSONMissingBlockErrorIdentifies when a JSON template file is referencing block types that don't exist.
JSONSyntaxErrorErrorIdentifies invalid JSON files in themes.
MatchingTranslationsWarningIdentifies missing or additional translations in locale files.Yes
ValidHTMLTranslationWarningIdentifies invalid HTML inside translations.

Was this page helpful?