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
Copy file name to clipboardExpand all lines: docs/integrations/ast-grep.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ By default, users can add AST-Grep rules by following these steps:
30
30
1. Create a folder that keeps all the `custom-name` in your project directory.
31
31
2. Add individual `.yaml` files for each AST-Grep rule within the `custom-name` folder.
32
32
3. Ensure each `.yaml` file contains the necessary AST-Grep rule configurations.
33
-
4. Ensure that all rules contains a `message` property, that is going to be used on the review process.
33
+
4. Ensure that all rules contains a `message` property, that will be used in the review process.
34
34
5. Add the `custom-name` folder to the `.code-rabbit.yml` file under `tools.ast_grep` configuration.
35
35
```yaml
36
36
#...
@@ -86,7 +86,7 @@ Atomic rule defines the most basic matching rule that determines whether one syn
86
86
#### **Relational rule**
87
87
Relational rule defines the relationship between two syntax nodes. There are four kinds of relational rule: `inside`, `has`, `follows` and `precedes`.
88
88
89
-
All four relational rules accept a subrule object as their value. The subrule will match the surrounding node while the relational rule itself will match the target node.
89
+
All four relational rules accept a sub-rule object as their value. The sub-rule will match the surrounding node while the relational rule itself will match the target node.
90
90
91
91
> Official documentation guide on [Relational Rule](https://ast-grep.github.io/guide/rule-config/relational-rule.html)
92
92
@@ -99,11 +99,11 @@ rule:
99
99
```
100
100
101
101
#### **Composite rule**
102
-
Composite rule defines the logical relationship between multiple subrules. There are three kinds of composite rule: `all`, `any` and `not`.
102
+
Composite rule defines the logical relationship between multiple sub-rules. There are three kinds of composite rule: `all`, `any` and `not`.
103
103
104
104
**all**
105
105
106
-
The `all` rule matches if all subrules match.
106
+
The `all` rule matches if all sub-rules match.
107
107
```yaml
108
108
rule:
109
109
all:
@@ -113,7 +113,7 @@ rule:
113
113
114
114
**any**
115
115
116
-
`any`rule matches if any subrule matches.
116
+
`any`rule matches if any sub-rule matches.
117
117
```yaml
118
118
rule:
119
119
any:
@@ -124,7 +124,7 @@ rule:
124
124
125
125
**not**
126
126
127
-
`not`applies negation to a subrule. It matches if the subrule does not match.
127
+
`not`applies negation to a sub-rule. It matches if the sub-rule does not match.
128
128
129
129
```yaml
130
130
rule:
@@ -203,7 +203,7 @@ rule:
203
203
204
204
CodeRabbit supports multiple programming languages for defining AST-Grep rules.
205
205
206
-
- Javascript
206
+
- JavaScript
207
207
- Typescript
208
208
- C#
209
209
- Golang
@@ -215,7 +215,7 @@ CodeRabbit supports multiple programming languages for defining AST-Grep rules.
215
215
216
216
Below are examples of AST-Grep rules in different languages:
217
217
218
-
### **Javascript**
218
+
### **JavaScript**
219
219
#### Importing files without an extension is not allowed
0 commit comments