Sha256: 0be7048dbae7d0646ebeee4e6c3e99908fb155498ad93b4351fbec3f35b9f35e

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

# Prevent Use of Unknown Filters (`UnknownFilter`)

This check prevents errors caused by using unknown filters in Liquid code and aims to eliminate the use of such filters.

## Examples

The following examples show code snippets that either fail or pass this check:

### ✗ Incorrect Code Example (Avoid using this):

```liquid
{{ x | some_unknown_filter }}
```

### ✓ Correct Code Example (Use this instead):

```liquid
{{ x | upcase }}
```

## Configuration Options

The default configuration for this check:

```yaml
UnknownFilter:
  enabled: true
```

## Disabling This Check

Disabling this check is not recommended, as it helps prevent user errors.

## Version

This check has been introduced in platformOS Check 0.0.1.

## Resources

- [Liquid Filter Reference](https://documentation.platformos.com/api-reference/liquid/filters)
- [platformOS Filter Reference](https://documentation.platformos.com/api-reference/liquid/platformos-filters)
- [Rule Source][codesource]
- [Documentation Source][docsource]

[codesource]: /lib/platformos_check/checks/unknown_filter.rb
[docsource]: /docs/checks/unknown_filter.md

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
platformos-check-0.4.14 docs/checks/unknown_filter.md
platformos-check-0.4.13 docs/checks/unknown_filter.md