Review
Review Configuration
Configure which files CodeAnt AI reviews in your pull requests
Control which files are included or excluded from automated PR reviews using simple pattern matching.
Overview
CodeAnt AI reviews all files in pull requests by default. Use review configuration to:
- Focus reviews on critical code paths
- Exclude test files or generated files
- Optimize review time and relevance
Note: CodeAnt does not analyze files mentioned in .gitignore
Setup
1. Create Configuration Folder
Create a .codeant
folder in your repository root (same level as your .git
folder):
2. Create Instructions File
Inside the .codeant
folder, create an configuration.json
file with your custom review instructions.
Configuration Format
The configuration.json
file uses the following structure:
How It Works
Default Behavior
- When both
include
andexclude
are empty: All files are reviewed - When only
exclude
has patterns: All files except matches are reviewed - When only
include
has patterns: Only matching files are reviewed - When both have patterns: Include patterns are applied first, then excludes
Pattern Matching
Patterns use minimatch syntax for flexible file matching.
Configuration Examples
Exclude Common Patterns
Include Only Source Code
Combined Include/Exclude
Pattern Reference
Basic Patterns
Pattern | Matches |
---|---|
*.js | All .js files in root |
**/*.js | All .js files in any directory |
src/** | Everything under src/ |
*.{js,ts} | All .js and .ts files |
!*.test.js | Exclude test files |
Common Exclusions
Pattern | Purpose |
---|---|
**/node_modules/** | Dependencies |
**/dist/** | Build output |
**/*.min.{js,css} | Minified files |
**/*.generated.* | Generated code |
**/coverage/** | Test coverage |
**/.env* | Environment files |
**/vendor/** | Third-party code |
**/*.{png,jpg,gif,svg} | Images |
**/package-lock.json | Lock files |
Common Inclusions
Pattern | Purpose |
---|---|
src/**/*.{js,ts,jsx,tsx} | Source files |
**/*.{py,pyw} | Python files |
app/**/*.rb | Ruby files |
**/*.{cs,vb} | .NET files |
**/*.{java,kt} | JVM files |
**/*.go | Go files |
**/*.rs | Rust files |
**/*.{swift,m,h} | iOS files |
Advanced Patterns
Pattern | Description | |
---|---|---|
src/**/!(*.test).* | Src files except tests | |
**/{src,lib}/**/*.js | JS in src or lib | |
`**/?(*.)+(.spec | test).js` | Optional test files |
**/*.controller.{ts,js} | Controller files | |
{app,src}/**/*.{ts,tsx} | TS files in multiple dirs |