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
|
- name: Run Clippy
|
||||||
working-directory: ./src-tauri
|
working-directory: ./src-tauri
|
||||||
run: cargo clippy-all
|
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
|
cd src-tauri
|
||||||
cargo clippy-all
|
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
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ use tauri_plugin_deep_link::DeepLinkExt;
|
|||||||
use utils::logging::Type;
|
use utils::logging::Type;
|
||||||
|
|
||||||
pub static APP_HANDLE: OnceCell<AppHandle> = OnceCell::new();
|
pub static APP_HANDLE: OnceCell<AppHandle> = OnceCell::new();
|
||||||
|
|
||||||
/// Application initialization helper functions
|
/// Application initialization helper functions
|
||||||
mod app_init {
|
mod app_init {
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
|||||||
@@ -10,6 +10,5 @@ fn main() {
|
|||||||
std::env::set_var("CLASH_VERGE_DISABLE_TRAY", "1");
|
std::env::set_var("CLASH_VERGE_DISABLE_TRAY", "1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
app_lib::run();
|
app_lib::run();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user