Skip to content

Commit fba124c

Browse files
authored
docs: add document about usage (#3)
Signed-off-by: Rintaro Okamura <[email protected]>
1 parent e178cfa commit fba124c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
![demo1](https://github.com/user-attachments/assets/1c767bc0-43c4-4a60-ab97-b8b8e916ddc8)
1111
![demo2](https://github.com/user-attachments/assets/3c341c29-536c-4032-b5f4-f9ec06731dfe)
1212

13-
This is an action to run [ast-grep][ast-grep] with [reviewdog][reviewdog].
13+
This is an action to run [ast-grep(sg)][ast-grep] with [reviewdog][reviewdog].
1414

1515
[ast-grep]: https://github.com/ast-grep/ast-grep
1616
[reviewdog]: https://github.com/reviewdog/reviewdog
@@ -59,6 +59,10 @@ inputs:
5959
6060
## Usage
6161
62+
Create `sgconfig.yml` and some rules in your repository by following the [project setup guide][sg-scan-guide].
63+
64+
Add a workflow to run action-ast-grep that triggered by pull request event.
65+
6266
```yaml
6367
name: reviewdog
6468
on: [pull_request]
@@ -76,8 +80,14 @@ jobs:
7680
# Change reporter level if you need.
7781
# GitHub Status Check won't become failure with warning.
7882
level: warning
83+
# path to the sgconfig.yml
84+
sg_config: sgconfig.yml
7985
```
8086

87+
Reviewdog will report `ast-grep scan` result.
88+
89+
[sg-scan-guide]: https://ast-grep.github.io/guide/scan-project.html
90+
8191
## Development
8292

8393
### Release

0 commit comments

Comments
 (0)