Skip to content

Commit

Permalink
docs: add document about usage (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Rintaro Okamura <[email protected]>
  • Loading branch information
rinx authored Aug 22, 2024
1 parent e178cfa commit fba124c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
![demo1](https://github.com/user-attachments/assets/1c767bc0-43c4-4a60-ab97-b8b8e916ddc8)
![demo2](https://github.com/user-attachments/assets/3c341c29-536c-4032-b5f4-f9ec06731dfe)

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

[ast-grep]: https://github.com/ast-grep/ast-grep
[reviewdog]: https://github.com/reviewdog/reviewdog
Expand Down Expand Up @@ -59,6 +59,10 @@ inputs:
## Usage
Create `sgconfig.yml` and some rules in your repository by following the [project setup guide][sg-scan-guide].

Add a workflow to run action-ast-grep that triggered by pull request event.

```yaml
name: reviewdog
on: [pull_request]
Expand All @@ -76,8 +80,14 @@ jobs:
# Change reporter level if you need.
# GitHub Status Check won't become failure with warning.
level: warning
# path to the sgconfig.yml
sg_config: sgconfig.yml
```

Reviewdog will report `ast-grep scan` result.

[sg-scan-guide]: https://ast-grep.github.io/guide/scan-project.html

## Development

### Release
Expand Down

0 comments on commit fba124c

Please sign in to comment.