feat: add Clippy alias commands and improve build process for Clippy integration (#5055)

* feat: add Clippy alias commands and improve build process for Clippy integration

* fix(lint-clippy): update Clippy run command to use working directory for src-tauri
This commit is contained in:
Tunglies
2025-10-14 14:43:03 +08:00
committed by GitHub
Unverified
parent 76ca24086b
commit 4dd811330b
5 changed files with 29 additions and 26 deletions

View File

@@ -63,29 +63,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y libxslt1.1 libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
- name: Pnpm install and check
run: |
pnpm i
pnpm run prebuild ${{ matrix.target }}
# This workflow runs linting using cargo clippy.
# Note: If the web build step is skipped,
# cargo clippy will fail to run due to missing web dist in the Tauri environment.
- name: Build Web Assets
run: pnpm run web:build
env:
NODE_OPTIONS: "--max_old_space_size=4096"
- name: Run Clippy
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features -- -D warnings
working-directory: ./src-tauri
run: cargo clippy-all