Commit Graph
8 Commits
Author SHA1 Message Date
FredApps cd888d0c1e clippy: one disallowed-types table after merging main
Main's egui::ComboBox ban and this PR's rsa private-key types each opened a
disallowed-types array; TOML forbids the duplicate key, so clippy couldn't
load the file. Both lists are now one array.
2026-11-26 21:16:17 +07:00
FredApps 4d97ae3d28 Merge main into #4025 2026-11-26 21:09:19 +07:00
Dylan M. Taylor d95ff3898d Enforce workspace Clippy standards and document lint policy 2026-10-27 23:12:52 +00:00
aiongg 9e90b2a54d refactor(ui): use craft-ui's ComboBox for every dropdown (#4988)
* Use craft_ui::ComboBox so dropdown menus grow back (egui#5225)

* chore(deps): craft-libs 60d60d48 (dropdown fixes)

* chore(deps): craft-libs 6af63481 (dropdown fixes)

* chore(deps): craft-libs 4d7b82f7 (dropdown fixes)

* chore(deps): craft-libs 92d392cf (#387 merged)
2026-10-27 16:22:20 -04:00
oracola91 f8e60b4cc3 clippy: also ban the rsa private-key methods
disallowed-types only fires where a type is named. A private key that
reaches pdfcraft without its type being named, returned by another crate
or behind a generic over rsa's traits, could still decrypt or sign. The
RsaPrivateKey constructors and private-key methods, and the private-key
methods of rsa's Decryptor, RandomizedDecryptor, PaddingScheme and
SignatureScheme traits, are now disallowed methods. The generic signature
and pkcs8 traits stay allowed: the ECDSA keys use them too.
2026-10-22 13:46:08 +03:00
oracola91 97354050b2 clippy: keep rsa verification-only
deny.toml ignores RUSTSEC-2023-0071 because pdfcraft-sign uses rsa only
to verify signatures (ADR-0009). clippy.toml now disallows the rsa types
that hold a private key and the two rsa::hazmat decrypt functions, so a
private-key operation through rsa fails clippy instead of quietly
breaking that assumption.
2026-10-22 11:43:30 +03:00
0ef75d294c UI: checkboxes and radio buttons are outlined, and checkboxes are square (#1173)
* UI: checkboxes draw a rounded-square box, not a radio-button circle

The theme's 6 px widget radius made egui's 14 px checkbox box a circle,
so View > Page display's Continuous scrolling and Show cover page looked
like two more layout radio buttons. On the light theme an unticked box
had no outline and the panel's fill, so it couldn't be seen.

Every checkbox (81 call sites) now goes through widgets::checkbox /
checkbox_without_text, which draws the box with a 3 px radius and a 1 px
border outline, keeping an outline the caller already set (dialogs).
clippy.toml disallows egui::Ui::checkbox and egui::Checkbox::{new,
without_text} so new checkboxes use the helper too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* UI: radio buttons are outlined and filled, so they show on the light theme

On the light theme the field colour is the panels' white and widgets
have no outline, so an unselected radio button (and an unticked
checkbox) was invisible outside dialogs: View > Page display showed only
the selected dot.

Every radio button (79 call sites) now goes through widgets::radio /
radio_value, sharing the checkbox helper's styling: a 1 px border
outline, text_muted on hover, and on the light theme the plain fill
(hover) as dialogs already had, keeping what the caller set. The dark
theme keeps its fills. clippy.toml also disallows egui::Ui::radio,
egui::Ui::radio_value and egui::RadioButton::new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-11 18:34:16 -04:00
Brandon ThomasandClaude Opus 5.5 554969da72 Never crash: forbid unsafe, clippy.toml for tests, guard and craftrules link
Follows the owner's AGENTS.md §4 / CLAUDE.md rules with what the shared standard
(craftrules/standards/never-crash.md) adds: why (lost work) and that it outranks feature work,
the `unsafe` ban (workspace `unsafe_code = "forbid"`; no unsafe exists outside vendor/),
the last-resort guard around commands and file import/export, the clippy ratchet attribute,
and a root clippy.toml that lets tests use unwrap/expect/panic/indexing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 13:24:00 -04:00