Skip to content

Chunking

By default, Warden analyzes each diff hunk separately. Chunking lets you skip files, review whole files, or merge nearby hunks for more context. The global scan policy runs before chunking; use defaults.ignore.paths to re-include built-in ignored files before assigning them a chunking mode.

Mode Behavior
per-hunk Analyze each diff hunk separately.
whole-file Analyze the entire file as one chunk.
skip Skip the file entirely.
enabledboolean
Enable hunk coalescing. Default: true.
maxGapLinesnumber
Max lines between hunks to merge. Default: 30.
maxChunkSizenumber
Target max chunk size in characters. Default: 8000.
warden.toml
[defaults.chunking]
[[defaults.chunking.filePatterns]]
pattern = "**/migrations/*.sql"
mode = "whole-file"
[[defaults.chunking.filePatterns]]
pattern = "**/snapshots/*.snap"
mode = "whole-file"
[defaults.chunking.coalesce]
enabled = true
maxGapLines = 50
maxChunkSize = 10000