Skip to content

Commit

Permalink
Use ast-grep GitHub action and pin versions
Browse files Browse the repository at this point in the history
This uses the official ast-grep GitHub Action [0] instead of installing it from npm in the clippy job.

Thanks for the suggestion from @HerringtonDarkholme!

[0] https://github.com/ast-grep/action
[1] #5637 (comment)
  • Loading branch information
wbinnssmith committed Jun 3, 2024
1 parent d4fd4fb commit 0210cde
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/turborepo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,18 @@ jobs:
run: |
cargo groups check turborepo-libraries --features rustls-tls
# From https://github.com/ast-grep/action/tree/v1.4/?tab=readme-ov-file#basic
ast-grep-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/[email protected]
with:
version: 0.22.5

rust_clippy:
needs: [rust_check]
name: Turborepo rust clippy
Expand All @@ -335,10 +347,6 @@ jobs:
run: |
cargo groups clippy turborepo-libraries --features rustls-tls -- --deny clippy::all
- name: Run ast-grep lints
run: |
npx --package @ast-grep/cli -- ast-grep scan $(cargo groups list turborepo-libraries | awk '{ print $2 }' | tr '\n' ' ')
rust_test:
needs: [rust_check]
strategy:
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"windmilleng.vscode-go-autotest",
"yzhang.markdown-all-in-one",
"zxh404.vscode-proto3",
"mihaipopescu.Cram"
"mihaipopescu.Cram",
"ast-grep.ast-grep-vscode"
]
}

0 comments on commit 0210cde

Please sign in to comment.