Excluding files from review
Skip generated code, build artifacts, and vendored dependencies with file exclusion patterns. Excluded lines do not consume review credits.
Last updated
You exclude files from review with file exclusion patterns. Lines in excluded files never reach the AI reviewer and never count against your review credit (RC) usage. ADO Pilot ships a default exclusion list covering binary formats and lock files; you add your own patterns for generated code, build outputs, and vendored dependencies.
What the setting controls
| Field | Type | Default | Scope merge |
|---|---|---|---|
fileExclusionPatterns | array of glob patterns | [] | Additive |
Patterns are evaluated against the path of each file in the PR diff. A file is excluded if its path matches any pattern in the merged list (defaults plus your custom patterns).
Default exclusions
These exclusions are always applied — you do not need to add them yourself.
ADO Pilot always excludes these file types from review. Lines in these files do not count toward review credit (RC) usage.
Binary formats
- Images:
.png,.jpg,.jpeg,.gif,.bmp,.ico,.webp,.svg,.tif,.tiff,.avif,.heic,.heif - Archives:
.zip,.tar,.gz,.rar,.7z,.bz2,.xz,.cab - Audio:
.mp3,.wav,.flac,.aac,.m4a,.wma - Video:
.mp4,.mov,.avi,.mkv,.webm,.m4v - Executables and libraries:
.exe,.dll,.so,.dylib,.a,.lib - Compiled bytecode:
.class,.pyc,.wasm
Generated and machine-maintained files
- Lock files ending in
.lock:yarn.lock,poetry.lock,Gemfile.lock,composer.lock - Source maps:
*.map
The default matcher uses the file's last-dot extension only. Lock files with a different extension — most importantly package-lock.json and pnpm-lock.yaml — are not excluded by default. If you do not want lock-file changes consuming review credits, add them to your org-level fileExclusionPatterns:
fileExclusionPatterns:
- "**/package-lock.json"
- "**/pnpm-lock.yaml"
The complete default list covers more than 150 extensions. Custom exclusion patterns you add stack on top of these defaults.
Glob pattern syntax
The same glob syntax used for branch filters:
| Pattern | Meaning | Matches |
|---|---|---|
*.generated.cs | Any file ending .generated.cs | Models/User.generated.cs |
build/** | Anything under build/ | build/output.js, build/intermediate/foo.o |
**/vendor/** | vendor/ at any depth | vendor/foo, services/api/vendor/lib/x.go |
dist/** | Anything under dist/ | dist/index.js, dist/assets/main.css |
Example: .NET / C#
Skip Roslyn-generated partials, designer files, and the obj/ and bin/ build directories.
fileExclusionPatterns:
- "*.generated.cs"
- "*.Designer.cs"
- "**/obj/**"
- "**/bin/**"
- ".vs/**"
Example: Node.js / TypeScript
Skip dependencies, build outputs, and minified bundles.
fileExclusionPatterns:
- "node_modules/**"
- "dist/**"
- "build/**"
- ".next/**"
- "*.min.js"
- "*.bundle.js"
Example: Python
Skip virtualenvs, bytecode caches, and packaging artifacts.
fileExclusionPatterns:
- "venv/**"
- ".venv/**"
- "__pycache__/**"
- "*.egg-info/**"
- "build/**"
- "dist/**"
Example: Go
Skip vendored modules and generated protobuf bindings.
fileExclusionPatterns:
- "vendor/**"
- "*.pb.go"
- "gen/**"
Additive merge across scopes
Exclusions from every scope combine. If your organization excludes *.generated.cs and a repository adds *.min.js, both patterns apply to that repository.
Organization: ["*.generated.cs", "package-lock.json"]
Project: ["build/**"]
Repository: ["*.min.js", "dist/**"]
Effective: ["*.generated.cs", "package-lock.json", "build/**", "*.min.js", "dist/**"]
In the example above the organization has explicitly added package-lock.json to its exclusions — package-lock.json is not excluded by default (see Default exclusions).
A file is excluded if it matches any pattern in the effective set, plus the default exclusions. See Org, project, and repo settings hierarchy.
Cost impact: excluded lines are free
Excluded lines never reach the AI reviewer, so they do not count when ADO Pilot calculates RC usage for a PR. This is the single biggest lever for controlling cost on PRs that touch generated or vendored content.
| Change | Without exclusion | With exclusion |
|---|---|---|
200 lines of code plus 800 lines of package-lock.json (added to exclusions) | 2 RC | 1 RC |
| 50 lines of code plus 20,000 lines of minified JS | 41 RC | 1 RC |
For details on how ADO Pilot calculates RC consumption, see the billing documentation.
What happens when every file is excluded
If every file in the PR matches an exclusion pattern, ADO Pilot detects an empty effective diff and skips the review. No comments are posted, no status check transitions to a result, and no RCs are charged.
Interaction with other settings
- Branch does not match the filter — Whole PR is skipped before exclusions are evaluated.
- Branch matches, all files excluded — Empty-diff skip path; 0 RC charged.
- Branch matches, some files excluded — Review runs on the remaining files; only those lines count toward RC.