You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 16, 2025. It is now read-only.
-AST-grep[official documentation](https://ast-grep.github.io/guide/rule-config.html) for detailed guides.
57
+
-ast-grep[official documentation](https://ast-grep.github.io/guide/rule-config.html) for detailed guides.
58
58
:::
59
59
60
-
This section explains how to add custom code review instructions usingAST-Grep rules.AST-Grep is a tool used for searching code using abstract syntax trees (AST) patterns.
60
+
This section explains how to add custom code review instructions usingast-grep rules.ast-grep is a tool used for searching code using abstract syntax trees (AST) patterns.
61
61
62
-
By default, you can addAST-Grep rules by following these steps:
62
+
By default, you can addast-grep rules by following these steps:
63
63
1. Create a folder that keeps all the ast-grep rules in your project directory.
64
-
2. Add individual`.yaml` files for eachAST-Grep rule within the newly created folder.
65
-
3. Ensure that each`.yaml` file contains the necessaryAST-Grep rule configurations.
64
+
2. Add individual`.yaml` files for eachast-grep rule within the newly created folder.
65
+
3. Ensure that each`.yaml` file contains the necessaryast-grep rule configurations.
66
66
4. Ensure that all rules contains a`message` property, that will be used in the review process.
67
67
5. Add the rules folder to the`.coderabbit.yml` file under`tools.ast-grep` configuration.
68
68
@@ -236,7 +236,7 @@ rule:
236
236
237
237
### Multiple Languages Support
238
238
239
-
CodeRabbit supports multiple programming languages for definingAST-Grep rules.
239
+
CodeRabbit supports multiple programming languages for definingast-grep rules.
240
240
241
241
-JavaScript
242
242
-Typescript
@@ -248,7 +248,7 @@ CodeRabbit supports multiple programming languages for defining AST-Grep rules.
248
248
-Python
249
249
-C
250
250
251
-
Below are examples ofAST-Grep rules in different languages:
251
+
Below are examples ofast-grep rules in different languages:
252
252
253
253
#### JavaScript
254
254
**Importing files without an extension is not allowed**