feat: add logging check to pre-commit and CI workflow

This commit is contained in:
Tunglies
2025-11-01 21:22:41 +08:00
Unverified
parent fb260fb33d
commit d3d32006c3
4 changed files with 12 additions and 2 deletions

View File

@@ -73,3 +73,10 @@ jobs:
- name: Run Clippy
working-directory: ./src-tauri
run: cargo clippy-all
- name: Run Logging Check
working-directory: ./src-tauri
shell: bash
run: |
cargo install --git https://github.com/clash-verge-rev/clash-verge-logging-check.git
clash-verge-logging-check

View File

@@ -27,6 +27,11 @@ if [ -n "$RUST_FILES" ]; then
(
cd src-tauri
cargo clippy-all
if ! command -v clash-verge-logging-check >/dev/null 2>&1; then
echo "[pre-commit] Installing clash-verge-logging-check..."
cargo install --git https://github.com/clash-verge-rev/clash-verge-logging-check.git
fi
clash-verge-logging-check
)
fi

View File

@@ -30,7 +30,6 @@ use tauri_plugin_deep_link::DeepLinkExt;
use utils::logging::Type;
pub static APP_HANDLE: OnceCell<AppHandle> = OnceCell::new();
/// Application initialization helper functions
mod app_init {
use anyhow::Result;

View File

@@ -10,6 +10,5 @@ fn main() {
std::env::set_var("CLASH_VERGE_DISABLE_TRAY", "1");
}
}
app_lib::run();
}