feat: add Clippy and Oxlint workflows for enhanced linting

This commit is contained in:
Tunglies
2025-08-22 19:20:35 +08:00
Unverified
parent 475a09bb54
commit 76c3695567
2 changed files with 36 additions and 5 deletions

View File

@@ -46,6 +46,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v4
@@ -57,10 +58,5 @@ jobs:
pnpm i
pnpm run prebuild ${{ matrix.target }}
- 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

35
.github/workflows/lint-oxlint.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Oxlint Lint
on:
pull_request:
workflow_dispatch:
jobs:
clippy:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Pnpm install and check
run: |
pnpm i
pnpm lint