Sha256: a54b218b370c8460a1bb8b874c64bfcdceb8223ebe5f12889bfde851645cfad3
Contents?: true
Size: 1.26 KB
Versions: 2
Compression:
Stored size: 1.26 KB
Contents
# Report usage of `include` tag inside `render` (`IncludeInRender`) A runtime error occurs when an `include` tag is used inside a `render` tag. This check aims to eliminate and report these occurrences. ## Examples The following examples show code snippets that either fail or pass this check: ### ✗ Incorrect Code Example (Avoid using this): ```liquid {% liquid # app/views/pages/index.liquid render 'foo' %} ```liquid {% liquid # app/views/partials/foo.liquid include 'bar' %} ``` ### ✓ Correct Code Example (Use this instead): ```liquid {% liquid # app/views/pages/index.liquid render 'foo' %} ```liquid {% liquid # app/views/partials/foo.liquid render 'bar' %} ``` ## Configuration Options The default configuration for this check: ```yaml IncludeInRender: enabled: true ``` ## Disabling This Check Disabling this check is not recommended. ## Version This check has been introduced in platformOS Check 0.4.9. ## Resources - [Deprecated Tags Reference][deprecated] - [Rule Source][codesource] - [Documentation Source][docsource] [deprecated]: https://documentation.platformos.com/api-reference/liquid/include [codesource]: /lib/platformos_check/checks/convert_include_to_render.rb [docsource]: /docs/checks/convert_include_to_render.md
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
platformos-check-0.4.14 | docs/checks/include_in_render.md |
platformos-check-0.4.13 | docs/checks/include_in_render.md |