Documentation
Exclude files with .inkspectignore
Keep build output, vendored code and other generated files out of Inkspect reviews with one file at the root of your repository.
Updated 28 October 2026Inkspect reads .inkspectignore from the base of each pull request, never from the changes under review. Commit the file to your default branch to put it to work.
What .inkspectignore does
A .inkspectignore file lists the paths Inkspect should leave out of a review. It lives at the root of your repository and holds one pattern per line, much like a .gitignore file.
When a pull request changes a file that matches a pattern, that file is left out of the review: its changes aren’t sent for analysis and it can’t receive findings. Matching files are also skipped when Inkspect indexes your repository, so they aren’t retrieved as related context.
Why it exists
Some files change in many pull requests without needing a reviewer: build output, minified bundles, vendored dependencies, generated clients and test snapshots. Reviewing them adds noise and uses AI Credits without making the review more useful.
- Focus: findings stay on the code your team wrote.
- Usage: excluded files aren’t read during the review, so a large generated diff doesn’t add to its cost.
- Limits: large pull requests can reach review size limits. Leaving generated files out keeps the files that matter within them.
Add the file
Create a file named .inkspectignore at the root of your repository and commit it to your default branch. Pull requests that branch from a commit containing the file use its rules.
This example suits a typical TypeScript project:
# Build output
dist/
coverage/
# Generated code and bundles
src/generated/
*.min.js
# Test snapshots
__snapshots__/Pattern syntax
Each line holds one pattern. Paths are relative to the repository root, and matching is case-sensitive.
- Lines that start with # are comments and blank lines are ignored. A comment must sit on its own line; text after a pattern becomes part of it.
- * matches any run of characters within a file or folder name, and ? matches exactly one character.
- ** on its own between slashes matches any number of folders, as in docs/**/*.png.
- A single name matches at any depth: dist/ and *.min.js apply anywhere in the repository. A leading slash, as in /build/, or a slash between names, as in src/generated/, matches from the root.
- A trailing slash matches everything inside a folder, but not a file with the same name.
- A line that starts with ! brings back paths an earlier line excluded. The last matching line wins, so you can keep a single file from an excluded folder.
- To match a name that starts with # or !, write \# or \! at the start of the pattern.
# dist folders at any depth, with everything inside
dist/
# Only the build folder at the repository root
/build/
# Minified bundles anywhere
*.min.js
# PNG files at any depth under docs/
docs/**/*.png
# Keep one file from dist/ under review
!dist/index.d.tsWhere the rules come from
Inkspect reads .inkspectignore from the base of the pull request: the commit where its branch meets the branch it targets. Rules in the pull request’s own changes are never used, so a pull request can’t exclude itself from review.
A pull request that edits .inkspectignore is reviewed like any other change, including the file itself. Its rules apply once it’s merged. To use updated rules in an open pull request, update its branch from the base branch.
- Only the file at the repository root is read. .inkspectignore files in subfolders have no effect.
- The root .inkspectignore is always reviewed, even when a pattern matches it.
What you’ll see in a review
The review comment notes how many changed files .inkspectignore excluded. Findings and scores cover the files that remain.
If every changed file is excluded, Inkspect finishes without an AI review, says so on the pull request, and uses no AI Credits.
When the file can’t be used
Inkspect doesn’t guess which files you meant to exclude. If .inkspectignore is invalid, the review doesn’t run and the pull request comment explains why. Repository indexing stops for the same reason.
Fix the file on the base branch, update the pull request from that branch, then reply “review again”.
- Character classes such as [abc], tabs, and backslashes other than a leading \# or \! aren’t supported.
- Empty segments, . and .. aren’t allowed in a pattern, and ** must stand alone between slashes.
- The file must be a regular file rather than a symbolic link, saved as UTF-8, and at most 32 KiB and 1,025 lines long. It can hold up to 512 patterns of up to 512 bytes each.
What .inkspectignore doesn’t do
.inkspectignore narrows what a review covers. It isn’t an access control or a secret scanner: Inkspect can still access the whole repository, and excluded files remain part of it. Keep secrets out of your repository instead of relying on an exclusion.
Every line deserves a second look.
Explore the product