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
-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 using AST-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 using ast-grep rules. ast-grep is a tool used for searching code using abstract syntax trees (AST) patterns.
61
61
62
-
By default, you can add AST-Grep rules by following these steps:
62
+
By default, you can add ast-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 each AST-Grep rule within the newly created folder.
65
-
3. Ensure that each `.yaml` file contains the necessary AST-Grep rule configurations.
64
+
2. Add individual `.yaml` files for each ast-grep rule within the newly created folder.
65
+
3. Ensure that each `.yaml` file contains the necessary ast-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 defining AST-Grep rules.
239
+
CodeRabbit supports multiple programming languages for defining ast-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 of AST-Grep rules in different languages:
251
+
Below are examples of ast-grep rules in different languages:
252
252
253
253
#### JavaScript
254
254
**Importing files without an extension is not allowed**
0 commit comments