mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-01 02:20:07 +08:00
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:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
@@ -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"] }
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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,4 +1,5 @@
|
||||
#![allow(non_snake_case)]
|
||||
#![deny(clippy::expect_used, clippy::unwrap_used)]
|
||||
#![recursion_limit = "512"]
|
||||
|
||||
mod cmd;
|
||||
|
||||
@@ -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")))]
|
||||
|
||||
Reference in New Issue
Block a user