Usage

File Patterns

Sheath uses glob-style patterns for default paths and ignore lists. Pattern normalization keeps ignore entries consistent between project-root paths and configured search roots.

#Supported Pattern Forms

Combine these forms to match files and directories.

Pattern Meaning
* Any characters within one path segment
** Any characters, / included
**/ Any number of leading directories, including none
? One character, other than /
{a,b} Either a or b

Examples:

'ignore' => [
'vendor/**',
'storage/**',
'*.min.blade.php',
'resources/views/legacy/**',
'**/*.generated.blade.php',
'resources/views/{emails,mail}/**',
],

**/ can match zero directories. For example, **/*.generated.blade.php matches generated templates in the current search directory and any directory below it.

Patterns match whole path segments. A pattern without a leading slash may match at any directory boundary, at any depth: emails/** excludes an emails directory at the top of the linted path and a nested admin/emails alike. It never matches inside a segment, so a sibling x-emails directory is not caught.

#Normalization

Ignore patterns are normalized against the actual search directory.

Example:

'paths' => ['resources/views'],
'ignore' => ['resources/views/emails/**'],

When Sheath lints resources/views, this pattern still matches files under emails/**. Ignore patterns can remain relative to the project root.

Project-relative prefixes may contain a single-segment wildcard, such as resources/*/emails/**. Explicitly named paths are linted even when they match an ignore pattern.

These two forms are effectively equivalent when linting resources/views:

// Project-root relative
'ignore' => ['resources/views/emails/**'],
// Relative to the linted path; equivalent here
'ignore' => ['emails/**'],

#Root-Anchored Patterns

Prefix a pattern with / when you want it anchored to the lint root rather than matching at any depth:

'paths' => ['resources/views'],
'ignore' => [
'/emails/**',
],

Here resources/views/emails is ignored while a nested resources/views/admin/emails still lints. An unanchored emails/** would exclude both.

Use this sparingly. In most Laravel projects, project-relative paths avoid the additional search-root context.

#CLI Examples

php artisan sheath:lint --ignore-pattern="resources/views/vendor/**"
php artisan sheath:lint --ignore-pattern="**/legacy/**" --ignore-pattern="**/generated/**"
php artisan sheath:lint --no-ignore

#Common Ignore Sets

#Email Templates

'ignore' => [
'resources/views/emails/**',
'resources/views/mail/**',
],

#Vendor Overrides

'ignore' => [
'resources/views/vendor/**',
],

#Generated or Legacy Templates

'ignore' => [
'**/*.generated.blade.php',
'resources/views/legacy/**',
],

#Practical Advice

  • Use forward slashes in patterns.
  • Prefer explicit project-relative paths for team readability.
  • Keep ignores documented when they are not obvious.
  • Revisit ignore lists occasionally so temporary exclusions do not become permanent blind spots.

#See Also