All rules

Sheath rule

statamic-directive-arguments

Statamic directives must receive their required arguments.
Package
Statamic
Category
Blade
Default severity
error by default
Auto-fix
Manual fix

#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: