A GitHub Action to run ast-grep linting!
See a more detailed setup guide in ast-grep's tooling guide.
Optional The version of ast-grep to use in the action. Default is latest.
Optional The file path to ast-grep's project config relative to root dir. Default is sgconfig.yml
.
Optional File paths string, corresponding to PATHS
passed to the ast-grep cli, to limit the paths the action runs on.
Multiple file paths can be delimited by whitespaces.
on: [push]
jobs:
sg-lint:
runs-on: ubuntu-latest
name: Run ast-grep lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: ast-grep lint step
uses: ast-grep/action@latest
on: [push]
jobs:
sg-lint:
runs-on: ubuntu-latest
name: Run ast-grep lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: ast-grep lint step
uses: ast-grep/action@latest
with:
version: 0.17.1
config: sgconfig.yml
paths: src lib