From 1ec58c9df42e2dd7dc0a84c0889360eb45c67e09 Mon Sep 17 00:00:00 2001 From: 189024609 <189024609+user583953@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:13:00 +0100 Subject: [PATCH] build: enforce usage of `crate::gui::widget::text` via clippy's `disallowed-{types, methods}` lints --- Cargo.toml | 3 +++ clippy.toml | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 clippy.toml diff --git a/Cargo.toml b/Cargo.toml index 34e4bfd..24854fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,5 +73,8 @@ shadow_unrelated = "warn" struct_field_names = "allow" # annoying module_name_repetitions = "allow" # annoying +disallowed_types = "deny" +disallowed_methods = "deny" + allow_attributes_without_reason = "warn" pedantic = { level = "warn", priority = -1 } diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 0000000..bb4c7e7 --- /dev/null +++ b/clippy.toml @@ -0,0 +1,7 @@ +disallowed-types = [ + { path = "iced::widget::Text", reason = "with some fonts text renders as squares without advanced shaping (see #523), instead use [`crate::gui::widgets::text`]" }, +] + +disallowed-methods= [ + { path = "iced::widget::text", reason = "with some fonts text renders as squares without advanced shaping (see #523), instead use [`crate::gui::widgets::text`]" }, +]