Sheath rule
statamic-directive-arguments
Statamic directives must receive their required arguments.
#Why
@tags, @frontmatter, and @nocache cannot compile a usable result without
an argument. Static @tags definitions must also use a shape that Statamic can
read.
#Examples
#Bad
{{-- Each directive is missing its required argument. --}}
@tags
@frontmatter()
@nocache
{{-- An empty nested definition is not a usable tag shape. --}}
@tags(['articles' => []])
#Good
{{-- Each directive receives the expected expression. --}}
@tags('collection:articles')
@frontmatter(['layout' => 'article'])
@nocache($accountSummary)
#Notes
An empty outer @tags([]) definition and @tags(null) are allowed. Dynamic
definitions and dynamic parameter maps are skipped when their runtime shape is
unknown. @cascade remains valid without arguments.
#See Also
Related checks validate usable literal tag definitions:
- statamic-tags-directive-tag-exists: Check tag handles and methods
- statamic-tags-directive-required-parameters: Check required inputs