Skip to content

Excluding files ​

An excluded file is never read and can produce no comments.

Review coverage changes immediately

Removing noise can make reviews clearer, but an overly broad pattern can hide important changes. New settings apply to the next review.

The starting list ​

A repository begins with common noise already excluded: lock and dependency metadata, build and coverage output, source maps and bundles, generated code, test snapshots, changelogs, SVG/CSV assets, and SQLite files. See the full list.

They are a starting point, not a floor. Every one of them sits in the repository's exclude list where you can see it and delete it. If you have a real source directory named out or coverage, or hand-authored .svg and .csv files you want reviewed, remove the pattern that catches them rather than renaming the directory. CHANGELOG.md is matched by exact, case-sensitive file name at any depth.

The list is also the only thing excluding files: clear it and every file in the pull request is reviewed. If you want the starting patterns back, Add defaults on the settings page restores the ones you have removed without touching anything else you have added.

One thing no setting changes: GitHub provides no diff for binaries and very large files, so those are skipped whatever your list says.

Adding your own ​

On a repository's settings page, add patterns one at a time, or use Edit as text to paste a whole list; one pattern per line. Each is a glob.

Changes apply to the next review; a review already running keeps the patterns it started with.

In the configuration file ​

A repository with a configuration file can set reviews.exclude there; it takes the same patterns and replaces the list on the settings page. See Settings keys.

yaml
reviews:
  exclude:
    - "**/fixtures/**"
    - "*.snap"

To skip whole pull requests by author, title or label instead, see filters.

How matching works ​

Patterns are matched against the file's path relative to the repository root, with two rules worth knowing:

  • A pattern without a / matches the file name at any depth. *.snap excludes src/__snapshots__/Button.snap as well as Button.snap.
  • A pattern with a / matches the full path from the repository root. src/generated/** matches only under that exact directory, so use **/generated/** if it can appear anywhere.

Dotfiles are matched like any other file; * covers .eslintrc too.

Examples ​

GoalPattern
Snapshot tests, anywhere*.snap
A vendored directory at the rootvendor/**
A vendored directory at any depth**/vendor/**
Every SQL migration**/migrations/**
Generated API clients**/api/generated/**
One specific noisy filepackages/db/src/schema/index.ts
All Markdown*.md

Checking what was skipped ​

The review detail page lists every file in the pull request. Skipped files sit in a Skipped group at the bottom of the file list, each labelled with what happened to it:

LabelMeaning
excludedA pattern in the repository's exclude list matched
too largeGitHub gave no diff for the file: a binary, or a file too large
skippedThe file was reviewable but the pull request went past Max files per review
Review detail with the Skipped group open, showing an excluded lockfile and the pattern that matched it
An excluded file in the Skipped group; the pane on the right names the pattern.

Select the file and the pane on the right says why:

  • Excluded by pattern: **/migrations/**; naming the exact pattern, so you know which entry to remove if you want the file read;
  • No diff available; the file is binary or too large to review.;
  • max_files_exceeded for a file past the file cap.

If a file you expected to be reviewed is missing, this is the first place to look.

The counts also reach the pull request: the review body's footer reads 3 skipped (excluded), or 5 skipped (2 excluded · 3 no diff) when more than one kind was involved.

When everything is excluded ​

A pull request whose files are all excluded still produces a review, and the check run reports success. Because nothing was read, the body is headed ⊘ Recommendation: Nothing to review, over the line Every changed file was excluded by the repository settings or had no reviewable diff., and its merge confidence reads 10.0/10 · High.

easymerge[bot] commented on this pull request

EasyMerge review

⊘ Recommendation: Nothing to review

Every changed file was excluded by the repository settings or had no reviewable diff.

High confidenceConfidence: 10.0/10 · High

A perfect score here means only that no finding was raised; nothing was read. The skipped count in the footer is what tells you that.