Lints: drop the workspace missing_docs lint and warn on it in the framework crates that document every public item

This commit is contained in:
aiongg
2026-11-14 00:15:29 +00:00
parent 3e4b679592
commit a17171af48
57 changed files with 56 additions and 6 deletions
-3
View File
@@ -199,9 +199,6 @@ chrono = { version = "0.4.45", default-features = false, features = ["std"] }
[workspace.lints.rust]
unsafe_code = "forbid"
# Every public item has a doc comment; a self-evident field or variant carries
# `#[allow(missing_docs)]` instead.
missing_docs = "warn"
unused_workspace_dependencies = "allow"
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(craft_pdf_unicode_fixtures)"] }
+1
View File
@@ -19,6 +19,7 @@
//!
//! Input is untrusted: a damaged or crafted file gives an [`Error`] or a [`Report`] entry, never
//! a panic, a hang or an allocation sized by a count in the file.
#![warn(missing_docs)]
pub mod aaf;
pub mod model;
+1 -1
View File
@@ -28,7 +28,7 @@
//! | [`spec`] | a provider described as data: types, checker and substitutions (task u2) |
//! | [`provider`] | the [`Provider`] trait |
//! | [`mock`], [`conformance`] | scripted provider and reusable behaviour checks |
#![warn(missing_docs)]
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
pub mod capability;
+1
View File
@@ -45,6 +45,7 @@
//! - **Web / WASM**: On `wasm32`, returns standard unsupported `io::Error` rather than panicking.
//! - **Failure Injection**: [`atomic_write_custom`] accepts an [`AtomicFs`] implementation so
//! callers and test suites can inject disk-full, lock-contention, or permission errors at each stage.
#![warn(missing_docs)]
use std::fs::{File, OpenOptions};
use std::io::{self, Write};
+1
View File
@@ -14,6 +14,7 @@
//!
//! The crate never names a document: what `engine.execute`, `ui.inspect` or `ui.set` mean is the
//! app's, through its method table. Everything a method table does not want to own is here.
#![warn(missing_docs)]
pub mod actions;
#[cfg(feature = "ui")]
+1
View File
@@ -3,6 +3,7 @@
//!
//! The crate depends on no egui crate: it uses `emath`, `kurbo` (geometry), `serde` (saved data) and the `accesskit`
//! data crate only.
#![warn(missing_docs)]
pub mod anchor;
+1
View File
@@ -8,6 +8,7 @@
//!
//! Every listing, status check, search and decode runs as a job on the host's queue; nothing
//! here spawns a thread.
#![warn(missing_docs)]
pub mod links;
pub mod places;
+1
View File
@@ -5,6 +5,7 @@
//! [`CmykModel`], web-safe colours ([`web_safe`], [`not_web_safe`]), swatch files ([`palette`]), the display transform ([`display`]) and colour
//! harmonies ([`harmony`]).
//! [`AreaMode`] (and `ui::RampKind`) serialize as their [`key`](AreaMode::key); the swatch and harmony settings types serialize too.
#![warn(missing_docs)]
mod cmyk;
pub mod display;
+1
View File
@@ -1,5 +1,6 @@
//! The craft libraries in one dependency. Turn on one feature per crate and `ui` for their
//! egui side; import through `craft::<crate>`.
#![warn(missing_docs)]
pub mod egui_fork;
+1
View File
@@ -29,6 +29,7 @@
//!
//! Colour (camera matrices, profiles) is out of scope: the file carries none, and the app owns
//! its colour model.
#![warn(missing_docs)]
mod tables;
#[cfg(test)]
+1
View File
@@ -8,6 +8,7 @@
//! The syntax half is [`check`]: it parses the configured directories and reports
//! literal sizes, named colour constants, style mutation and crate-wide clippy allows as a [`Report`].
//! A [`Baseline`] records the findings of an existing code base so a check fails only on new ones.
#![warn(missing_docs)]
mod baseline;
mod clippy;
+1
View File
@@ -17,6 +17,7 @@
//! On macOS, Open and Folder show as a free-standing panel that doesn't block the window, as
//! native apps do; Save and message boxes show as a sheet on the parent window. Elsewhere every
//! dialog is a modal owned by the parent window.
#![warn(missing_docs)]
mod filter;
mod native;
+1
View File
@@ -28,6 +28,7 @@
//! assert_eq!(info.version, 4);
//! assert!(info.supported);
//! ```
#![warn(missing_docs)]
mod budget;
mod cancel;
+1
View File
@@ -77,6 +77,7 @@
//! assert_eq!(resolve(r"\\other\share\logo.png", Some(doc)), Err(Refused::Network));
//! assert_eq!(resolve_absolute("img/logo.png", None), Err(Refused::Invalid));
//! ```
#![warn(missing_docs)]
pub mod links;
pub mod names;
+1
View File
@@ -1,4 +1,5 @@
//! Vector and shape tools: gradient editing, the Pen and path editing, strokes and corners, shapes, slices, artboards and connectors, Crop and Perspective Crop, Free Transform, measure, symmetry and brush presets.
#![warn(missing_docs)]
pub mod geometry;
pub mod stroke;
+1
View File
@@ -5,6 +5,7 @@
//! reads the tags as a drawing (header variables, tables, blocks, entities, objects); mapping
//! that onto an application's own document is left to the caller. Written from Autodesk's
//! published DXF Reference; depends on no other Craft crate. Moved from CADCraft's `cadcraft-dxf`.
#![warn(missing_docs)]
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
#![forbid(unsafe_code)]
+1
View File
@@ -52,6 +52,7 @@
//!
//! An `.ecprojx` file holds the same object encoded as XML. This crate reads and writes the JSON
//! form only.
#![warn(missing_docs)]
use std::borrow::Cow;
use std::fmt;
+1
View File
@@ -12,6 +12,7 @@
//!
//! Also on `ui`: [`glyphs::GlyphsPanel`], [`missing::MissingFontsDialog`], [`axes::AxisSliders`] and
//! [`picker::FontPicker`], the font family field for text tools and panels.
#![warn(missing_docs)]
pub mod filter;
pub mod index;
+1
View File
@@ -10,6 +10,7 @@
//! - [`embed_permission`]: what a font's OS/2 `fsType` allows an exported document (PDF) to embed.
//!
//! Synchronous and free of I/O.
#![warn(missing_docs)]
mod cff;
pub mod closure;
+1
View File
@@ -50,6 +50,7 @@
//! Web builds can serve the faces beside the wasm instead: [`Embed::serve`] copies the selected
//! files into a directory and writes a table of [`ServedFace`]s, which carry a URL in place of the
//! bytes, for the app to fetch the faces it needs at run time.
#![warn(missing_docs)]
mod cmap;
pub mod coverage;
+1
View File
@@ -1,4 +1,5 @@
#![doc = include_str!("../README.md")]
#![warn(missing_docs)]
mod files;
pub mod queue;
+1
View File
@@ -1,6 +1,7 @@
//! Raster image editing for Craft apps: warps, adjustments, layer styles, selection tools and masks, the full-window editors, channels and scopes.
//!
//! [`scopes`], [`selection`], [`trace`] and [`layer_style`] work without egui and build on every target. The widgets are behind the `ui` feature.
#![warn(missing_docs)]
pub mod layer_style;
pub mod scopes;
+1
View File
@@ -45,6 +45,7 @@
//! allocations are checked against the [`Limits`] first.
//! Damaged entropy-coded data stops that scan; what was decoded is kept and the caller is told
//! through [`Decoded::damaged`].
#![warn(missing_docs)]
/// Why a stream could not be decoded.
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
+1
View File
@@ -131,6 +131,7 @@
//! assert_eq!((report.unmatched[0].item.as_str(), report.unmatched[0].line), ("File > Frobnicate", Some(13)));
//! assert_eq!(keymap.bindings(&"file.save".into()), [Binding::parse("Cmd+Alt+S").unwrap()]);
//! ```
#![warn(missing_docs)]
pub mod chord;
pub mod command;
+1
View File
@@ -3,6 +3,7 @@
//! The app implements `ui::tree::LayerTree`, a read-only view of its layers, and shows it with
//! `ui::panel::LayersPanel`, which reports what the user did as events in the order they
//! happened. The app applies them with its own commands and undo.
#![warn(missing_docs)]
pub mod ui;
+1
View File
@@ -17,6 +17,7 @@
//!
//! `bitstream` and `isobmff` are on by default; `matroska`, `ogg`, `avi`, `mxf` and `mpegts` are opt-in. A crate that needs
//! only bit I/O uses `default-features = false, features = ["bitstream"]`.
#![warn(missing_docs)]
#[cfg(feature = "avi")]
pub mod avi;
+1
View File
@@ -82,6 +82,7 @@
//! (or [`NativeMenu::sync`], which compares a layout built every frame).
//! The input filter also keeps a click or Escape that closes an open native menu away
//! from egui.
#![warn(missing_docs)]
pub mod bar;
pub mod context;
+1
View File
@@ -18,6 +18,7 @@
//! tables.
//!
//! Lengths are PDF points (1/72 inch) throughout; screen lengths are egui points.
#![warn(missing_docs)]
pub mod layout;
#[cfg(test)]
+1
View File
@@ -31,6 +31,7 @@
//! assert_eq!(manifest.document["name"], "Untitled");
//! assert_eq!(manifest.thumbnail, None);
//! ```
#![warn(missing_docs)]
mod limits;
mod migrate;
+1
View File
@@ -9,6 +9,7 @@
//! On developer machines, [`report`] separates each scene's PDF into plates with Ghostscript
//! ([`gs`], an external program; [`tiff`] reads the plates) and [`judge`]s the ink at the
//! scene's sample points.
#![warn(missing_docs)]
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
pub mod gs;
+1
View File
@@ -1,5 +1,6 @@
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
//! Shared lifecycle mechanics; application state, theme choices and file policy stay in hosts.
#![warn(missing_docs)]
#[cfg(feature = "appearance")]
pub mod appearance;
pub mod autosave;
+1
View File
@@ -3,6 +3,7 @@
//! Prepress for the Craft apps: an ink model and ink manager shared by the writers,
//! plates rendered from a PDF, coverage and a color preview read from the plates, and process
//! color conversion through craft-cms. See the README.
#![warn(missing_docs)]
pub mod cms;
pub mod composite;
+1 -1
View File
@@ -5,7 +5,7 @@
//! with the options as a PrintTicket, all in this process (`windows.rs`): no PowerShell or other
//! program is started, so printing works where scripts are locked down. Other platforms report
//! that printing isn't available yet; the print-ready PDF can still be saved.
#![warn(missing_docs)]
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
#[cfg(any(test, windows))]
+1
View File
@@ -59,6 +59,7 @@
//! installed on the system, then the whole Moby word list built into the crate (see
//! [`english_source`]). Hyphenation that needs the data is off without it; grammar and the
//! rule-based hyphenation (Bulgarian, Turkish, Russian) are code and still work.
#![warn(missing_docs)]
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
pub mod affix;
+1
View File
@@ -13,6 +13,7 @@
//! [`quit`] is that quit. With the `ui` feature, [`on_menu_event`] turns a native Quit menu item
//! into a close request of the root window, and [`intercept_close`] holds a close while documents
//! are unsaved.
#![warn(missing_docs)]
mod close;
#[cfg(target_os = "macos")]
+1
View File
@@ -4,6 +4,7 @@
//!
//! Review data is the app's document data: every widget reads it and reports edits; nothing here
//! owns or stores it.
#![warn(missing_docs)]
pub mod annotate;
pub mod comments;
+1
View File
@@ -34,6 +34,7 @@
//! store.update(|p| p.appearance.theme = "dark".into());
//! // Call `store.tick(Instant::now())` every frame and `store.flush()` on exit.
//! ```
#![warn(missing_docs)]
pub mod document;
pub mod error;
+1
View File
@@ -1,6 +1,7 @@
//! Spreadsheet widgets: the cell grid and the tools around it (outline bands, field lists,
//! conditions, charts, slicers, reference picking, statistics, error tags, filter buttons).
//! UI-only: everything is in [`ui`], behind the `ui` feature.
#![warn(missing_docs)]
#[cfg(feature = "ui")]
pub mod ui;
+1
View File
@@ -27,6 +27,7 @@
//!
//! Language features (`spanish`, `german`, …, `all-languages`) add data for that language and
//! turn on the modules that use it.
#![warn(missing_docs)]
#[cfg(feature = "bidi")]
pub mod bidi;
+1
View File
@@ -34,6 +34,7 @@
//! let selection = accepted.suite.with_defaults(&defaults);
//! assert_eq!((selection.theme.light, selection.mode), (graphite.id, ModeChoice::Dark));
//! ```
#![warn(missing_docs)]
mod backend;
mod client;
+1
View File
@@ -20,6 +20,7 @@
//! let resolved = resolve(&theme, appearance, None);
//! assert!(resolved.warnings.is_empty());
//! ```
#![warn(missing_docs)]
mod app_sizes;
mod builtins;
+1
View File
@@ -3,6 +3,7 @@
//! The scenario list, the measurement and the report are shared. A library supplies a
//! [`Library`]: the foundation binary runs [`run_all`] over it and writes `baseline/foundation.json`. It reads
//! `baseline/legacy.json`, the recorded baseline of the old library, as its speed gate.
#![warn(missing_docs)]
mod alloc;
mod harness;
+1
View File
@@ -5,6 +5,7 @@
//!
//! The root re-exports craft-ui-panels' modules and the ones it re-exports; `dialog` adds the full-window family to
//! panels' dialogs.
#![warn(missing_docs)]
// The derives' output names the crate as `craft_ui`, here as in every other crate.
extern crate self as craft_ui;
+1
View File
@@ -5,6 +5,7 @@
//!
//! The crates above it re-export these modules at their roots, so `crate::runtime::…` and `craft_ui::contract::…`
//! name the same items in every crate of the library.
#![warn(missing_docs)]
// The derives' output names the crate as `craft_ui`, here as in every other crate.
extern crate self as craft_ui;
+1
View File
@@ -1,4 +1,5 @@
//! The craft-ui story viewer: the registered stories of the linked crates, shown under a chosen appearance.
#![warn(missing_docs)]
pub mod chrome;
pub mod viewer;
+1
View File
@@ -1,5 +1,6 @@
//! Macros of craft-ui: `#[derive(Component, Pattern, Props, ComponentStyle, TokenGroup, CommandSet, EnvValue)]`,
//! `words!`, `#[story]`, `#[craft_ui::testing::trial]` and `register_contract!`.
#![warn(missing_docs)]
mod command_set;
mod component;
+1
View File
@@ -4,6 +4,7 @@
//! patterns read without the canvas.
//!
//! The root re-exports craft-ui-widgets' modules and the ones it re-exports.
#![warn(missing_docs)]
// The derives' output names the crate as `craft_ui`, here as in every other crate.
extern crate self as craft_ui;
+1
View File
@@ -3,6 +3,7 @@
//! The patterns of the craft UI library: ready-made dialogs, presets, preferences, dock areas and panels (layer 6).
//!
//! The root re-exports craft-ui-panels' modules and the ones it re-exports.
#![warn(missing_docs)]
// The derives' output names the crate as `craft_ui`, here as in every other crate.
extern crate self as craft_ui;
+1
View File
@@ -3,6 +3,7 @@
//! The shell of the craft UI library: `AppShell`, the title bar and the eframe entry point (layer 7).
//!
//! The root re-exports craft-ui-panels' modules and the ones it re-exports.
#![warn(missing_docs)]
// The derives' output names the crate as `craft_ui`, here as in every other crate.
extern crate self as craft_ui;
+1
View File
@@ -1,5 +1,6 @@
//! The test kits the craft-ui crates' integration binaries share: components written with the derives, and a
//! frame driver for child viewports. Their registrations are this package's, so no library's suite runs them.
#![warn(missing_docs)]
// The kits name the library as `craft_ui`, as the test files do.
extern crate craft_ui_contract as craft_ui;
+1
View File
@@ -5,6 +5,7 @@
//!
//! The root re-exports craft-ui-contract's modules, so components name them as `crate::runtime::…` and derive output
//! as `craft_ui::…`.
#![warn(missing_docs)]
// The derives' output names the crate as `craft_ui`, here as in every other crate.
extern crate self as craft_ui;
+1
View File
@@ -7,6 +7,7 @@
//! craft-ui-widgets, craft-ui-panels, then craft-ui-canvas, craft-ui-patterns and craft-ui-shell side by side. This
//! crate re-exports all of them under one root, so every `craft_ui::…` path names the same item as in the crate that
//! defines it.
#![warn(missing_docs)]
pub use craft_ui_canvas::{canvas, canvas_controls, dialog};
#[cfg(feature = "testing")]
+1 -1
View File
@@ -1,5 +1,5 @@
//! Native only (it downloads and installs through ureq): release checking, downloading, installing and self-updating for the Craft App Suite and ArtCraft Launcher.
#![warn(missing_docs)]
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
pub mod app;
+1
View File
@@ -32,6 +32,7 @@
//!
//! The crate takes and returns bytes. It does not open files or decompress past the first bytes
//! [`sniff`] reads: a reader of a compressed file decompresses it with its own limits first.
#![warn(missing_docs)]
pub mod base64;
mod container;
+1
View File
@@ -34,6 +34,7 @@
//! let page = Rc::new(PageApi::new("vectorcraft", Methods::default(), request));
//! page.install()?; // window.vectorcraft
//! ```
#![warn(missing_docs)]
pub mod methods;
pub mod reply;
+1
View File
@@ -3,6 +3,7 @@
//!
//! This is the only crate (besides the benchmark's allocator) that allows `unsafe`; the design-lint rule
//! `contract/unsafe-allow` names it. Every block says why it is sound.
#![warn(missing_docs)]
#![cfg(windows)]
#![allow(unsafe_code)]
+1
View File
@@ -56,6 +56,7 @@
//!
//! [`restore`] (no egui) decides where a window opens, from the last session's geometry and the
//! connected monitors, and keeps the `window.json` store beside `config.toml` on desktop (memory on the web).
#![warn(missing_docs)]
pub mod capture;
pub mod desktop;