Leave generated files out of reviews
Mark generated output in .gitattributes, then enable Exclude files marked linguist-generated in the repository's review scope. Keep the source files that produce that output in the review.
Mark the generated paths#
Add patterns to the repository's .gitattributes file. For example:
generated/** linguist-generated
*.min.js linguist-generated
Use paths that match your repository. A directory's .gitattributes can override a parent rule. To keep a file included, unset the attribute for that path:
generated/handwritten.ts -linguist-generated
Merge the attributes change before relying on it for later pull requests. Proofline reads these exclusion rules at the pull request's merge base, so a pull request cannot exclude its own changes by adding a new attribute rule.
Enable the exclusion#
- Open Repositories and select the repository.
- Open Settings → Review scope.
- Under Files, select Exclude files marked linguist-generated.
- Select Save scope.
Use Preview recent pull requests to inspect the scope. On a completed review, Not reviewed lists files left out and the reason.
If a file is still included#
Check its path against the patterns and any nested .gitattributes overrides. Confirm that the attributes change was already in the pull request's merge base.
If Proofline cannot read the attributes, the files remain included and the review names the failure. File exclusions apply to the model review; they do not disable environment checks.