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.
CodeAnt AI reviews all files in pull requests by default. Use review configuration to:
Note: CodeAnt does not analyze files mentioned in .gitignore
Create a .codeant
folder in your repository root (same level as your .git
folder):
Inside the .codeant
folder, create an configuration.json
file with your custom review instructions.
The configuration.json
file uses the following structure:
include
and exclude
are empty: All files are reviewedexclude
has patterns: All files except matches are reviewedinclude
has patterns: Only matching files are reviewedPatterns use minimatch syntax for flexible file matching.
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 |
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 |
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 |
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 |