> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Choose which files are reviewed

> Use path filters to exclude files from review, override the default ignore list, and avoid filters that turn into an allowlist.

Path filters decide which changed files CodeRabbit reviews. CodeRabbit already skips lock files, binaries, generated code and build output. Add your own patterns to skip more, or to bring a skipped file type back into review.

Path filters skip files inside a pull request. To skip a whole pull request by label, title or author, see [Control when reviews run](https://docs.coderabbit.ai/pr-reviews/when-reviews-run.md).

> [!NOTE]
>
> CodeRabbit doesn't review a pull request that changes more files than your plan allows. See the files-per-review limits in [Plans](https://docs.coderabbit.ai/management/plans.md#rate-limits). The limit counts only the files left after path filters, so if your pull requests often hit it, exclude files that don't need review, such as generated code, localization files or snapshots.

## How path filters work

Each entry in `path_filters` is a glob pattern. A pattern that starts with `!` excludes files. A pattern without `!` includes them.

* Patterns are `Minimatch` globs, matched against repository-relative paths. Matching is case-insensitive, hidden files (names starting with a dot) are included, and there are no gitignore rules.
* A file is reviewed only if it matches at least one include pattern, when you set any, and it matches no `!` pattern.
* Exclusions always win, whatever the order of the entries.
* CodeRabbit adds its default exclusions in front of your list.

| Your `path_filters` | Result |
| - | - |
| `["!docs/**"]` | Everything is reviewed except `docs/`. |
| `["src/**"]` | Only files under `src/` are reviewed. |
| `["src/**", "!src/generated/**"]` | Files under `src/`, except `src/generated/`. |

## Configure

> [tab] In the app
>
> Open **Review settings**, choose **Organization defaults** or a repository, and set **View mode** to **All Settings**. Go to **Reviews > General** and find **Path filters**. Select **Apply changes** and confirm.

> [tab] YAML V2
>
> ```yaml .coderabbit.yaml theme={null}
> reviews:
>   path_filters:
>     - "!**/vendor/**"
>     - "!**/fixtures/**"
> ```

> [tab] YAML V3
>
> Early Access (This feature is in early access. Enable it by setting `early_access: true` in your `.coderabbit.yaml`, or by toggling Early Access on the web interface.)
>
> V3 is a limited preview. Adding `version: 3` doesn't give your organization access.
>
> ```yaml .coderabbit.yaml theme={null}
> version: 3
> reviews:
>   behavior:
>     path_filters:
>       - "!**/vendor/**"
>       - "!**/fixtures/**"
> ```

## Keep path filters from becoming an allowlist

Any include pattern limits review to the files it matches, unless it exactly matches a [default exclusion](#files-skipped-by-default). CodeRabbit accepts a list with only include patterns and doesn't warn you.

> [!WARNING]
>
> A lone `src/**` stops CodeRabbit from reviewing everything outside `src/`, including `package.json` and your CI files.

```yaml Review only src theme={null}
reviews:
  path_filters:
    - "src/**"
```

```yaml Review everything except two folders theme={null}
reviews:
  path_filters:
    - "!docs/**"
    - "!**/vendor/**"
```

Use exclusions to narrow review. Use an include only when you want an allowlist, or to turn off one default exclusion.

## Files skipped by default

CodeRabbit skips these groups of files unless you override them.

| Group | Examples |
| - | - |
| Build and dependency folders | `dist`, `node_modules`, `.next`, `.nuxt`, `.cache` |
| Lock files | `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `bun.lockb`, `Package.resolved`, and every `*.lock` file such as `Cargo.lock` and `Gemfile.lock` |
| Generated code | Folders named `generated`, `gen`, `__generated__` and variants, files named `*.generated.*`, and `*.tsbuildinfo` |
| Compiled files and archives | `*.class`, `*.dll`, `*.exe`, `*.zip`, `*.jar` |
| Audio, video, images and fonts | `*.mp4`, `*.webm`, `*.png`, `*.svg`, `*.woff2` |
| Documents and data | `*.pdf`, `*.csv`, `*.tsv`, `*.parquet`, `*.db` |
| Logs, maps and checksums | `*.log`, `*.map`, `*.sum` (including `go.sum`) |
| Minified and bundled output | `*.min.js`, `*.min.css`, hashed chunks such as `assets/index-AbCd1234.js` |
| 3D and game assets | `*.fbx`, `*.unity`, `*.prefab`, `*.shadergraph` |
| Language and tool files | `*.pyc`, `*.pkl`, `*.pb.go`, `*.tfstate` |

Shader sources such as `*.hlsl`, `*.glsl` and `*.shader` are reviewed by default. CodeRabbit drops the entries `**/*.hlsl`, `**/*.glsl` and `**/*.shader` from your `path_filters`, so they don't turn your list into an allowlist.

### Every default pattern

The groups below list every pattern CodeRabbit adds in front of your `path_filters`. To review a skipped file type, copy its pattern without the leading `!`, as described in [Review files that are skipped by default](#review-files-that-are-skipped-by-default).

> [accordion] Build and dependency folders
>
> ```text theme={null}
> !**/dist/**
> !**/node_modules/**
> !**/.svelte-kit/**
> !**/.webpack/**
> !**/.yarn/**
> !**/.docusaurus/**
> !**/.temp/**
> !**/.cache/**
> !**/.next/**
> !**/.nuxt/**
> ```

> [accordion] Lock files
>
> ```text theme={null}
> !**/package-lock.json
> !**/yarn.lock
> !**/pnpm-lock.yaml
> !**/bun.lockb
> !**/*.lock
> !**/Package.resolved
> ```

> [accordion] Generated code
>
> ```text theme={null}
> !**/generated/**
> !**/@generated/**
> !**/__generated__/**
> !**/__generated/**
> !**/_generated/**
> !**/gen/**
> !**/@gen/**
> !**/__gen__/**
> !**/__gen/**
> !**/_gen/**
> !**/*.generated.*
> !**/*.tsbuildinfo
> ```

> [accordion] Compiled files and binaries
>
> ```text theme={null}
> !**/*.app
> !**/*.bin
> !**/*.class
> !**/*.dll
> !**/*.dylib
> !**/*.exe
> !**/*.lo
> !**/*.o
> !**/*.so
> !**/*.wasm
> ```

> [accordion] Archives and disk images
>
> ```text theme={null}
> !**/*.bz2
> !**/*.gz
> !**/*.xz
> !**/*.zip
> !**/*.7z
> !**/*.rar
> !**/*.zst
> !**/*.tar
> !**/*.jar
> !**/*.war
> !**/*.nar
> !**/*.iso
> ```

> [accordion] Audio and video
>
> ```text theme={null}
> !**/*.mp3
> !**/*.wav
> !**/*.wma
> !**/*.flac
> !**/*.ogg
> !**/*.m4a
> !**/*.mp4
> !**/*.avi
> !**/*.mkv
> !**/*.wmv
> !**/*.m4v
> !**/*.3gp
> !**/*.3g2
> !**/*.rm
> !**/*.mov
> !**/*.flv
> !**/*.swf
> !**/*.webm
> ```

> [accordion] Images and fonts
>
> ```text theme={null}
> !**/*.ico
> !**/*.svg
> !**/*.jpeg
> !**/*.jpg
> !**/*.png
> !**/*.gif
> !**/*.bmp
> !**/*.tiff
> !**/*.ttf
> !**/*.otf
> !**/*.woff
> !**/*.woff2
> !**/*.eot
> !**/*.glif
> ```

> [accordion] Documents and data
>
> ```text theme={null}
> !**/*.pdf
> !**/*.doc
> !**/*.docx
> !**/*.xls
> !**/*.xlsx
> !**/*.ppt
> !**/*.pptx
> !**/*.csv
> !**/*.tsv
> !**/*.dat
> !**/*.db
> !**/*.parquet
> ```

> [accordion] Logs, maps, checksums and editor files
>
> ```text theme={null}
> !**/tags
> !**/.tags
> !**/TAGS
> !**/.TAGS
> !**/.DS_Store
> !**/.cscope.files
> !**/.cscope.out
> !**/.cscope.in.out
> !**/.cscope.po.out
> !**/*.log
> !**/*.map
> !**/*.out
> !**/*.sum
> !**/*.md5sum
> !**/*.work
> ```

> [accordion] Minified and bundled output
>
> Bundlers write production assets with a content hash in the file name, often outside `dist` and without `.min`. The last four patterns match that shape. Each `[0-9a-z_-]` class is one hash character, the URL-safe alphabet that Rollup and Vite use by default, written out eight times because glob patterns have no repetition syntax. Matching is case-insensitive, so `assets/index-DUKDdC5R.js` matches too.
>
> The hash width keeps most hand-written files in review: `assets/index-page.js` and `src/editor.chunk.js` are reviewed. A hand-written name whose segment is exactly eight of these characters, such as `assets/index-my-thing.js`, is skipped. To review it, add the matching pattern without the `!`.
>
> ```text theme={null}
> !**/*.min.js
> !**/*.min.js.map
> !**/*.min.js.css
> !**/*.min.css
> !**/*.[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].chunk.js
> !**/*.[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].chunk.css
> !**/assets/index-[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].js
> !**/assets/index-[0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-][0-9a-z_-].css
> ```

> [accordion] 3D and game assets
>
> ```text theme={null}
> !**/*.tga
> !**/*.dds
> !**/*.psd
> !**/*.fbx
> !**/*.obj
> !**/*.blend
> !**/*.dae
> !**/*.gltf
> !**/*.unity
> !**/*.umap
> !**/*.prefab
> !**/*.mat
> !**/*.shadergraph
> !**/*.sav
> !**/*.scene
> !**/*.asset
> ```

> [accordion] Language and tool files
>
> ```text theme={null}
> !**/*.pyc
> !**/*.pyd
> !**/*.pyo
> !**/*.pkl
> !**/*.pickle
> !**/*.egg
> !**/*.pb.go
> !**/*.pb.gw.go
> !**/*.tfstate
> !**/*.tfstate.backup
> !**/*.xcworkspace/contents.xcworkspacedata
> ```

> [accordion] Other file types
>
> ```text theme={null}
> !**/*.p
> !**/*.pem
> !**/*.pub
> !**/*.rkt
> !**/*.ss
> !**/*.dot
> !**/*.snap
> ```

## Review files that are skipped by default

To review a skipped file type, add its exact default pattern without the `!`. This removes the default exclusion and does not create an allowlist.

| To review | Add this pattern |
| - | - |
| SVG images | `**/*.svg` |
| Hand-written code in a `gen` folder | `**/gen/**` |
| CSV files | `**/*.csv` |

> [!WARNING]
>
> A narrower pattern does not override a default. `src/gen/**` leaves `**/gen/**` in place and turns your list into an allowlist. Copy the default pattern exactly.

The same applies to folders that only look generated. CodeRabbit matches `gen` and `generated` at any depth, so hand-written code in a folder with either name is skipped until you add the exact pattern.

## Where filtered files show up

* Filtered files don't appear in the walkthrough or the [Change Stack](https://docs.coderabbit.ai/change-stack.md). Your Git provider still lists them in the pull request's file list.
* When path filters exclude every changed file, CodeRabbit skips the review with the reason **No files to review**. The review finishes as a successful no-op, so a required `CodeRabbit` check passes. See [CodeRabbit status check](https://docs.coderabbit.ai/pr-reviews/status-check.md).

## Limits and availability

* Path filters work on every Git platform and apply to organization defaults and repositories.
* Path filters also shape the repository checkout, and Git's sparse-checkout rules differ from review matching. Tools can see a different file set than the review.
* On Azure DevOps, the default exclusions apply directly to repository inventory and diff hydration, so an override doesn't take effect on those two paths.
* IDE reviews apply the default list after the extension's own exclusions.
* Schema V3 is a limited preview.

## Troubleshoot

* A file you expected in review is missing: check the default list above, then look for an include pattern that created an allowlist. Print the resolved filters with [Check which configuration a review used](https://docs.coderabbit.ai/configuration/guides/check-effective-configuration.md).
* No review ran on a pull request that only changes lock files or generated code: see [Find out why a pull request wasn't reviewed](https://docs.coderabbit.ai/pr-reviews/missing-reviews.md).

**All settings:** [`reviews.path_filters` in the configuration reference](https://docs.coderabbit.ai/reference/configuration#param-reviews-path-filters). V3 key: [`reviews.behavior.path_filters`](https://docs.coderabbit.ai/reference/configuration-v3#param-reviews-behavior-path-filters).

## What's next

> [card] [Teach CodeRabbit your review rules](https://docs.coderabbit.ai/pr-reviews/review-instructions.md)
>
> Give guidance for the files that stay in review.

> [card] [Configure a monorepo](https://docs.coderabbit.ai/configuration/guides/monorepo.md)
>
> Scope filters and instructions by package.

> [card] [Reduce review noise](https://docs.coderabbit.ai/configuration/guides/reduce-noise.md)
>
> Combine filters with profile and instructions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.