v0.51.1.
Configuration
- .coderabbit.yaml
- Web UI
.coderabbit.yaml
rule_dirs lists directories with your custom ast-grep rules, and util_dirs lists directories with utility configs that support rule management. Both take paths relative to the repository root. packages takes GitHub repositories in owner/repository format.
Paths in rule_dirs and util_dirs must point to directories available in the reviewed commit, with matching case. CodeRabbit rejects entries that use absolute paths or parent-directory traversal, or contain control or shell-sensitive characters.
If configured directories remain unavailable after recovery attempts, CodeRabbit reports incomplete custom-rule coverage and continues with the available rule and package directories. Unavailable or unauthorized rule packages also cause an incomplete-coverage report. CodeRabbit skips scanning when no usable rule directories remain.
CodeRabbit will only run ast-grep if you have configured at least one of the following:
- Custom rule directories (
rule_dirs) - Essential rules enabled (
essential_rules: true) - Custom packages (
packages)
util_dirs can be used to support shared utility configs, but by itself it does not cause ast-grep to run.CodeRabbit also skips ast-grep when the pull request contains no changed files with a supported extension. Individual files that are 8 MiB or larger are skipped.Links
- ast-grep Documentation
- Writing ast-grep Rules
- ast-grep Rule Object Properties
- ast-grep Essentials Package
Files
ast-grep runs on changed files with the following extensions:.bash.c.cpp.cs.css.erb(parsed as HTML).ex.exs.go.h.hpp.hs.html.java.js.json.jsx.kt.lua.php.py.rb.rs.scala.sh.sql.swift.ts.tsx.yaml.yml