Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Commit9941a21

Browse files
petrisorcoderabbitharjotgill
authored andcommitted
Update the ast-grep documentation to include the coderabbit config file changes
1 parenta059d97 commit9941a21

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

‎docs/integrations/ast-grep.md‎

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,20 @@ This documentation provides guidance on integrating AST-Grep rules within the Co
2727
###**Setting up AST-Grep rules**
2828
By default, users can add AST-Grep rules by following these steps:
2929

30-
1. Create a foldernamed`rules` in your project directory.
31-
2. Add individual`.yaml` files for each AST-Grep rule within the`rules` folder.
30+
1. Create a folderthat keeps all the`custom-name` in your project directory.
31+
2. Add individual`.yaml` files for each AST-Grep rule within the`custom-name` folder.
3232
3. Ensure each`.yaml` file contains the necessary AST-Grep rule configurations.
3333
4. Ensure that all rules contains a`message` property, that is going to be used on the review process.
34+
5. Add the`custom-name` folder to the`.code-rabbit.yml` file under`tools.ast_grep` configuration.
35+
```yaml
36+
#...
37+
reviews:
38+
#...
39+
tools:
40+
ast_grep:
41+
rules_folder:"custom-name"
42+
#...
43+
```
3444

3545
###**The rule object**
3646

@@ -159,6 +169,19 @@ my-awesome-project # project root
159169
| |- is-literal.yml
160170
```
161171

172+
>Also, you need to add the `rules` and `utils` folders to the `.code-rabbit.yml` file under `tools.ast_grep` configuration.
173+
174+
```yaml
175+
#...
176+
reviews:
177+
#...
178+
tools:
179+
ast_grep:
180+
rules_folder: "rules"
181+
utils_folder: "utils"
182+
#...
183+
```
184+
162185
```yaml
163186
# is-literal.yml
164187
id: is-literal

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp