build: enforce usage of crate::gui::widget::text via clippy's disallowed-{types, methods} lints

This commit is contained in:
189024609 2025-02-19 17:13:00 +01:00
commit 1ec58c9df4
2 changed files with 10 additions and 0 deletions

View file

@ -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 }

7
clippy.toml Normal file
View file

@ -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`]" },
]