Sheath rule
statamic-partial-exists
#Why
A missing partial fails when Statamic asks Laravel to find its view. Checking the literal name during linting keeps the diagnostic on the template that contains the reference.
#Examples
#Bad
{{-- cards/missing does not resolve to a project view. --}}
<s:partial src="cards/missing" />
#Good
{{-- cards/article resolves through a configured view path. --}}
<s:partial src="cards/article" />
{{-- Method shorthand and fluent calls resolve the same project views. --}}
<s:partial:article-card />
{{ Statamic::tag('partial')->src('article-card') }}
#Conditions And Dynamic Values
Static when and unless values control whether a missing partial is
reported. A reference that is statically disabled is skipped.
Dynamic partial names, dynamic conditions, opaque attributes, and dynamic parameter maps are skipped because the target or execution state is not known.
#Notes
The exists and if_exists methods are not reported because they are designed
to probe optional partials. A bare partial without a source does not produce a
missing-partial finding.
A method suffix takes precedence over an explicit src attribute, matching
Statamic's partial selection behavior.
#See Also
Related rules check required inputs and non-view resources:
- statamic-required-tag-parameter: Require a partial source
- statamic-resource-exists: Check repositories, registries, and routes