Sha256: 25caaad270f936abbd5df77fe4d2c8bd7858388f1b3dcba827dd754e27bb2772

Contents?: true

Size: 1.04 KB

Versions: 18

Compression:

Stored size: 1.04 KB

Contents

# Prevent undefined object errors (`UndefinedObject`)

This check prevents errors by making sure that no undefined variables are being used

## Check Details

This check is aimed at eliminating undefined object errors.

:-1: Examples of **incorrect** code for this check:

```liquid
{% assign greetings = "Hello" %}
{% if greeting == "Hello" %}

{{ articl }}
{{ prodcut }}
```

:+1: Examples of **correct** code for this check:

```liquid
{% assign greetings = "Hello" %}
{% if greetings == "Hello" %}

{{ article }}
{{ product }}
```

## Check Options

The default configuration for this check is the following:

```yaml
UndefinedObject:
  enabled: true
```

## When Not To Use It

It is discouraged to disable this rule.

## Version

This check has been introduced in Theme Check 0.1.0.

## Resources

- [Shopify Object Reference](https://shopify.dev/docs/themes/liquid/reference/objects)
- [Rule Source][codesource]
- [Documentation Source][docsource]

[codesource]: /lib/theme_check/checks/undefined_object.rb
[docsource]: /docs/checks/undefined_object.md

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
theme-check-1.2.0 docs/checks/undefined_object.md
theme-check-1.1.0 docs/checks/undefined_object.md
theme-check-1.0.0 docs/checks/undefined_object.md
theme-check-0.10.2 docs/checks/undefined_object.md
theme-check-0.10.1 docs/checks/undefined_object.md
theme-check-0.10.0 docs/checks/undefined_object.md
theme-check-0.9.1 docs/checks/undefined_object.md
theme-check-0.9.0 docs/checks/undefined_object.md
theme-check-0.8.3 docs/checks/undefined_object.md
theme-check-0.8.2 docs/checks/undefined_object.md
theme-check-0.8.1 docs/checks/undefined_object.md
theme-check-0.8.0 docs/checks/undefined_object.md
theme-check-0.7.3 docs/checks/undefined_object.md
theme-check-0.7.2 docs/checks/undefined_object.md
theme-check-0.7.1 docs/checks/undefined_object.md
theme-check-0.7.0 docs/checks/undefined_object.md
theme-check-0.6.0 docs/checks/undefined_object.md
theme-check-0.5.0 docs/checks/undefined_object.md