feat: add logging check to pre-commit and CI workflow
This commit is contained in:
7
.github/workflows/lint-clippy.yml
vendored
7
.github/workflows/lint-clippy.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -10,6 +10,5 @@ fn main() {
|
||||
std::env::set_var("CLASH_VERGE_DISABLE_TRAY", "1");
|
||||
}
|
||||
}
|
||||
|
||||
app_lib::run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user