@@ -12,12 +12,9 @@ description:
12
12
This section explains how to add custom code review instructions for the entire
13
13
project or specific file paths in your project using glob patterns. Developers
14
14
can provide tailored review guidelines based on the file paths. These
15
- instructions are needed only if you want the reviewer to follow specific
16
- instructions besides the standard review.
17
-
18
- Adding file path prompts allows developers to specify custom instructions for
19
- different parts of the codebase. For example, you may want to enforce a style
20
- guide by file types or directories.
15
+ instructions are needed only if you want CodeRabbit to follow specific
16
+ instructions besides the standard review. For example, you may want to enforce a
17
+ style guide by file types or directories.
21
18
22
19
### Sample Usage
23
20
@@ -35,16 +32,21 @@ guide by file types or directories.
35
32
36
33
::: note
37
34
38
- - Paths accept glob patterns.
39
- - Instructions generally work well for specific additional instructions.
40
- However, they are not that effective if you are instructing AI not to do
41
- something.
42
- - Test the review feedback on pull requests and tailor as necessary.
35
+ Paths accept glob patterns. See the
36
+ [ minimatch] ( https://github.com/isaacs/minimatch ) documentation for more
37
+ information.
43
38
44
39
:::
45
40
46
41
## Abstract Syntax Tree (AST) based instructions {#ast-based}
47
42
43
+ CodeRabbit offers review instructions based on Abstract Syntax Tree (AST)
44
+ patterns. Under the hood, CodeRabbit uses
45
+ [ ` ast-grep ` ] ( https://ast-grep.github.io ) to power this feature. ` ast-grep ` is
46
+ written in Rust and uses the tree-sitter parser to generate the AST for popular
47
+ languages. ` ast-grep ` is written and maintained by
48
+ [ Herrington Darkholme] ( https://twitter.com/hd_nvim ) .
49
+
48
50
::: note
49
51
50
52
** Deep dive into AST patterns and ` ast-grep ` rules**
@@ -117,7 +119,7 @@ rule:
117
119
matches : " utility-rule"
118
120
` ` `
119
121
120
- ### Three Rule Categories
122
+ ### Rule Categories
121
123
122
124
To summarize the rule object fields above, we have three categories of rules:
123
125
0 commit comments