ci(clippy): install ast-grep via npm (#7119)

This commit is contained in:
Boshen 2024-11-04 23:34:06 +08:00 committed by GitHub
parent c2802e63fc
commit fc6dc52b72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -178,10 +178,10 @@ jobs:
save-cache: ${{ github.ref_name == 'main' }}
cache-key: clippy
components: clippy
tools: ast-grep
- run: cargo lint -- -D warnings
- name: Check Char and Byte Offset
run: |
npm i @ast-grep/cli -g
output=$(sg -p '$A.chars().enumerate()' -r '$A.char_indices()' -l rs)
echo "Output: $output"
if [ -n "$output" ]; then