https://github.com/rinx/setup-tree-sitter-parser
an action to install tree-sitter cli and build tree-sitter parser.
https://github.com/rinx/setup-tree-sitter-parser
Last synced: 5 months ago
JSON representation
an action to install tree-sitter cli and build tree-sitter parser.
- Host: GitHub
- URL: https://github.com/rinx/setup-tree-sitter-parser
- Owner: rinx
- License: mit
- Created: 2024-08-23T12:34:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-25T03:23:02.000Z (almost 2 years ago)
- Last Synced: 2025-03-14T16:47:52.259Z (about 1 year ago)
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Action: Setup tree-sitter parser
This is an action to install tree-sitter cli and build tree-sitter parser.
## Inputs
### `parser_dir`
Directory to store built parser shared library.
The default is `./parser`.
### `parser_repository`
**Required**
Parser repository name to build.
### `parser_repository_ref`
The branch, tag or SHA to checkout parser repository.
## Usage
When using [reviewdog/action-ast-grep][reviewdog/action-ast-grep] for custom language, it is useful to build parser by using this action.
```yaml
name: reviewdog
on: [pull_request]
jobs:
ast-grep:
name: runner / ast-grep / fennel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build tree-sitter grammar for fennel
uses: rinx/setup-tree-sitter-parser@v1
with:
# this action will place the build artifact here.
parser_dir: ./
parser_repository: alexmozaidze/tree-sitter-fennel
- name: Run ast-grep with reviewdog
uses: reviewdog/action-ast-grep@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
level: info
reporter: github-pr-review
```
[reviewdog/action-ast-grep]: https://github.com/reviewdog/action-ast-grep