Skip to content

Commit

Permalink
chore(ci): add check
Browse files Browse the repository at this point in the history
  • Loading branch information
shulaoda committed Oct 5, 2024
1 parent 511b3ca commit 9f6b972
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,22 @@ jobs:
run: pnpm build && pnpm test
- run: git diff --exit-code
if: steps.filter.outputs.src == 'true'

ast-grep:
name: AST Grep
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1
- uses: Boshen/setup-rust@main
with:
restore-cache: false
tools: ast-grep
- name: Check Char and Byte Offset
id: ast_grep
run: |
output=$(sg -p '$A.chars().enumerate()' -r '$A.char_indices()' -l rs)
echo "Output: $output"
if [ -n "$output" ]; then
echo "Error: Unexpected output detected"
exit 1
fi

0 comments on commit 9f6b972

Please sign in to comment.