Path Patterns
Use glob patterns to include or exclude files from analysis.Include Patterns
Glob patterns for files to analyze. Can be set at skill level or in defaults.
Exclude Patterns
Glob patterns for files to exclude. Skill-level patterns combine with
defaults.ignorePaths.Pattern Syntax
Warden uses glob pattern matching:| Pattern | Matches |
|---|---|
src/**/*.ts | All .ts files in src/ and subdirectories |
**/*.test.ts | All .test.ts files anywhere |
src/auth/** | Everything in src/auth/ and subdirectories |
*.config.js | Config files in root only |
**/migrations/* | All files directly in any migrations/ directory |
lib/*.{ts,js} | .ts and .js files directly in lib/ |
Pattern Examples
Include specific directories:Built-in Skip Patterns
These patterns are always applied before user patterns and cannot be overridden:Package Manager Locks
**/pnpm-lock.yaml**/package-lock.json**/yarn.lock**/Cargo.lock**/go.sum**/poetry.lock**/composer.lock**/Gemfile.lock**/Pipfile.lock**/bun.lockb
Minified/Bundled Code
**/*.min.js**/*.min.css**/*.bundle.js**/*.bundle.css
Build Artifacts
**/dist/****/build/****/node_modules/****/.next/****/out/****/coverage/**
Generated Code
**/*.generated.***/*.g.ts**/*.g.dart**/generated/****/__generated__/**
Built-in patterns ensure Warden doesn’t waste time analyzing files that shouldn’t be reviewed (lock files, build artifacts, etc.).
Chunking Configuration
Chunking controls how files are split for analysis. Configure at the global level in[defaults.chunking].
File Patterns
Control processing mode for specific file types.Each pattern has:
pattern: Glob pattern to match filesmode: Processing mode ("per-hunk","whole-file", or"skip")
Processing Modes
per-hunk (default)
per-hunk (default)
Analyze changed hunks (diff sections) independently. Most efficient for large files with small changes.
whole-file
whole-file
Analyze the entire file content in one pass. Useful for:
- Configuration files
- Small files where context matters
- Files where hunks are interdependent
skip
skip
Skip files entirely. Overrides built-in skip patterns when you want to explicitly skip certain patterns.
User-defined file patterns have higher priority than built-in skip patterns. Use
mode = "per-hunk" to force analysis of files that would normally be skipped.Coalescing
Coalescing merges nearby hunks into larger chunks to reduce API calls and improve context.Enable hunk coalescing.Default:
trueMaximum line gap between hunks to merge.Default: 30
Target maximum chunk size in characters.Default: 8000
Context Files
Maximum number of “other files” to list in hunk prompts for PR context. Set to
0 to disable entirely.Default: 50Complete Chunking Example
Common Patterns
TypeScript/JavaScript Project
Security-Critical Paths
Monorepo with Package Filtering
Skip Generated and Legacy Code
Different Skills for Different File Types
Analyze Configs as Whole Files
Pattern Precedence
File classification follows this order:- User-defined file patterns (
defaults.chunking.filePatterns) - checked first - Built-in skip patterns - checked if no user pattern matches
- Default mode (
per-hunk) - used if no patterns match
Performance Considerations
Coalescing reduces API calls
Coalescing reduces API calls
Merging nearby hunks reduces the number of LLM API calls:
- Without coalescing: 10 small hunks = 10 API calls
- With coalescing: 10 small hunks merge into 2-3 chunks = 2-3 API calls
Whole-file mode is slower
Whole-file mode is slower
whole-file mode sends the entire file content to the LLM, which:- Increases token usage and cost
- Takes longer to process
- Provides more context for analysis
whole-file selectively for small, critical files.Skip patterns improve speed
Skip patterns improve speed
Aggressive use of
ignorePaths and skip patterns:- Reduces the number of files analyzed
- Speeds up analysis significantly
- Lowers API costs
Debugging
Use verbose flags to see which files are being processed:- Files matched by
paths - Files excluded by
ignorePaths - Files skipped by built-in patterns
- Processing mode for each file (per-hunk, whole-file, skip)
Next Steps
Skill Configuration
Configure skill behavior
Severity Thresholds
Control finding levels
Performance Tuning
Optimize analysis speed and cost
CLI Reference
Command-line options