Customize Review
Rules
Create and manage custom review rules through CodeAnt AI Dashboard
These rules extend CodeAnt’s default bug and security detection with company-specific coding practices, naming conventions, and standards.
Accessing Dashboard Rules
Navigate to your Dashboard settings:
- Go to app.codeant.ai/settings/customized-review
- Select Rules from the dropdown menu
- Click Add New to create a new custom rule
Creating Rules
Step 1: Select Repositories
Choose which repositories should apply this rule:
- Use the search bar to find specific repositories
- Select multiple repositories using checkboxes
- All selected repositories will receive the same rule
Step 2: Configure Rule
Rule Description (Required)
- Provide a clear, specific description of what this rule enforces
- Explain the reasoning behind the rule for team clarity
File Patterns (Required)
- Specify which files this rule applies to using glob patterns
- Click Add to include multiple patterns
- Use minimatch syntax for pattern matching
Rule Categories
Code Quality Rules
No Console Logs in Production:
Function Complexity Limits:
Dead Code Detection:
API and Architecture Rules
REST API Conventions:
Pattern Examples
Common File Patterns
Pattern | Description |
---|---|
src/**/*.{js,ts} | All JavaScript/TypeScript in src |
**/*.test.* | All test files |
src/components/**/*.tsx | React components only |
!**/node_modules/** | Exclude dependencies |
{api,routes}/**/*.js | API and route files |
src/{models,entities}/**/* | Data models |
**/*.{css,scss,less} | Stylesheets |
src/utils/**/*.ts | Utility functions |
Advanced Patterns
Pattern | Description | |
---|---|---|
`src/**/!(*.test | .spec).` | Source files excluding tests |
**/*.{config,conf}.{js,ts} | Configuration files | |
{src,lib,app}/**/*.ts | Multiple source directories | |
**/*{Controller,Service,Repository}.* | Specific class types | |
src/**/*.{gql,graphql} | GraphQL files |
Custom rules work alongside CodeAnt’s built-in detection, providing comprehensive code review coverage tailored to your team’s specific needs.