From c75aa1990f5c1e7e86de0fafc9ce0c1b1dcac3ea Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Sun, 21 Apr 2024 10:43:46 -0600 Subject: [PATCH] build: add clippy::cargo lint (#1053) Followup to https://github.com/ratatui-org/ratatui/pull/1035 and https://github.com/ratatui-org/ratatui/discussions/1034 It's reasonable to enable this and deal with breakage by fixing any specific issues that arise. --- Cargo.toml | 2 ++ clippy.toml | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 clippy.toml diff --git a/Cargo.toml b/Cargo.toml index d55f90ac..88d0659e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,7 +64,9 @@ serde_json = "1.0.109" [lints.rust] unsafe_code = "forbid" + [lints.clippy] +cargo = { level = "warn", priority = -1 } pedantic = { level = "warn", priority = -1 } cast_possible_truncation = "allow" cast_possible_wrap = "allow" diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000..4e166a69 --- /dev/null +++ b/clippy.toml @@ -0,0 +1,4 @@ +# https://rust-lang.github.io/rust-clippy/master/index.html#/multiple_crate_versions +# ratatui -> bitflags v2.3 +# termwiz -> wezterm-blob-leases -> mac_address -> nix -> bitflags v1.3.2 +allowed-duplicate-crates = ["bitflags"]