chore(clippy): scope crate lint policy

Keep panic-on-error lints at application target roots and scope signal dependencies to Linux.
This commit is contained in:
Tunglies
2026-11-30 18:13:46 +08:00
parent e04fae62d9
commit 1fa03291f3
7 changed files with 12 additions and 3 deletions
-2
View File
@@ -124,7 +124,6 @@ copy_iterator = "deny"
correctness = { level = "deny", priority = -1 }
dbg_macro = "warn"
equatable_if_let = "deny"
expect_used = "warn"
expl_impl_clone_on_copy = "deny"
future_not_send = "deny"
iter_on_empty_collections = "deny"
@@ -163,7 +162,6 @@ unnecessary_self_imports = "deny"
unnecessary_wraps = "deny"
unused_async = "deny"
unused_trait_names = "deny"
unwrap_used = "warn"
use_self = "deny"
useless_let_if_seq = "deny"
wildcard_imports = "deny"
+5
View File
@@ -0,0 +1,5 @@
# Clippy loads a single configuration file, so repeat the workspace defaults.
avoid-breaking-exported-api = true
allow-unwrap-in-tests = true
cognitive-complexity-threshold = 25
excessive-nesting-threshold = 5
+1 -1
View File
@@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024"
rust-version = "1.91"
[dependencies]
[target.'cfg(target_os = "linux")'.dependencies]
clash-verge-logging = { workspace = true }
log = { workspace = true }
tokio = { workspace = true, features = ["signal"] }
+2
View File
@@ -1,3 +1,5 @@
#![deny(clippy::expect_used, clippy::unwrap_used)]
fn main() -> Result<(), Box<dyn std::error::Error>> {
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows")
&& std::env::var("CARGO_CFG_TARGET_ENV").as_deref() == Ok("msvc")
+2
View File
@@ -1,3 +1,5 @@
#![deny(clippy::expect_used, clippy::unwrap_used)]
// Dev-only target: Tauri ships everything under src/bin/ to /usr/bin in deb/rpm
// bundles (PR #8131), so this generator must stay an example, never a bin.
fn main() -> Result<(), Box<dyn std::error::Error>> {
+1
View File
@@ -1,4 +1,5 @@
#![allow(non_snake_case)]
#![deny(clippy::expect_used, clippy::unwrap_used)]
#![recursion_limit = "512"]
mod cmd;
+1
View File
@@ -1,4 +1,5 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
#![deny(clippy::expect_used, clippy::unwrap_used)]
use std::process::ExitCode;
#[cfg(not(all(feature = "perf-harness", target_os = "macos")))]