Skip to content

Commit 1a89781

Browse files
committed
fix path instructions example
1 parent 5a23ac4 commit 1a89781

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

docs/guides/configure-coderabbit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ reviews:
3333
review_status: true
3434
collapse_walkthrough: false
3535
path_filters:
36-
- "!**/.xml"
36+
- "!**/*.xml"
3737
path_instructions:
3838
- path: "**/*.js"
3939
instructions:

docs/guides/review-instructions.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@ description:
1212
This section explains how to add custom code review instructions for the entire
1313
project or specific file paths in your project using glob patterns. Developers
1414
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.
2118

2219
### Sample Usage
2320

@@ -35,16 +32,21 @@ guide by file types or directories.
3532

3633
:::note
3734

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.
4338

4439
:::
4540

4641
## Abstract Syntax Tree (AST) based instructions {#ast-based}
4742

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+
4850
:::note
4951

5052
**Deep dive into AST patterns and `ast-grep` rules**
@@ -117,7 +119,7 @@ rule:
117119
matches: "utility-rule"
118120
```
119121
120-
### Three Rule Categories
122+
### Rule Categories
121123
122124
To summarize the rule object fields above, we have three categories of rules:
123125

0 commit comments

Comments
 (0)