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
parent 76ca24086b
commit 4dd811330b
5 changed files with 29 additions and 26 deletions

View File

@@ -510,7 +510,22 @@ pub fn run() {
}
}
// Mock context for Clippy to avoid build errors
#[cfg(feature = "clippy")]
let context = tauri::test::mock_context(tauri::test::noop_assets());
#[cfg(feature = "clippy")]
let app = builder.build(context).unwrap_or_else(|e| {
logging!(
error,
Type::Setup,
"Failed to build Tauri application: {}",
e
);
std::process::exit(1);
});
// Build the application
#[cfg(not(feature = "clippy"))]
let app = builder
.build(tauri::generate_context!())
.unwrap_or_else(|e| {