diff --git a/apps/effectcraft-cli/src/main.rs b/apps/effectcraft-cli/src/main.rs index aa6c7384..753f0626 100644 --- a/apps/effectcraft-cli/src/main.rs +++ b/apps/effectcraft-cli/src/main.rs @@ -34,6 +34,8 @@ //! `` is a comp id or name (`-` = the active comp); `` an id, `#n` or name; `` //! is JSON (`50`, `[960,540]`, `"#ff0000"`) or a bare string. See `docs/agents.md`. +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + use effectcraft_automation::tools::{self, Reply}; use effectcraft_automation::{Backend, McpServer}; use serde_json::{Value, json}; diff --git a/apps/effectcraft-web/src/lib.rs b/apps/effectcraft-web/src/lib.rs index 013e0d36..0d59906f 100644 --- a/apps/effectcraft-web/src/lib.rs +++ b/apps/effectcraft-web/src/lib.rs @@ -20,6 +20,8 @@ //! //! [`store`] is portable (unit-tested natively); everything else is `wasm32`-only. +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + pub mod store; #[cfg(target_arch = "wasm32")] diff --git a/apps/effectcraft/src/main.rs b/apps/effectcraft/src/main.rs index 2262ad80..d365d01d 100644 --- a/apps/effectcraft/src/main.rs +++ b/apps/effectcraft/src/main.rs @@ -5,6 +5,8 @@ //! `--control ` (or `EFFECTCRAFT_CONTROL_PORT`) starts a localhost JSON-lines control server; //! see `effectcraft_ui_egui::control` for the methods. +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + mod audio_out; mod control_server; #[cfg(target_os = "macos")] diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 00000000..4b6c79f5 --- /dev/null +++ b/clippy.toml @@ -0,0 +1,4 @@ +allow-unwrap-in-tests = true +allow-expect-in-tests = true +allow-panic-in-tests = true +allow-indexing-slicing-in-tests = true diff --git a/crates/automation/src/lib.rs b/crates/automation/src/lib.rs index e3bf88cd..fc3767b1 100644 --- a/crates/automation/src/lib.rs +++ b/crates/automation/src/lib.rs @@ -13,6 +13,8 @@ //! Layering: depends on `effectcraft-engine` only (never egui); the CLI injects a fully wired //! session (`effectcraft_host::session()`). +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + pub mod backend; pub mod base64; pub mod bridge; diff --git a/crates/color/src/lib.rs b/crates/color/src/lib.rs index fd94e5a8..1fae0ea9 100644 --- a/crates/color/src/lib.rs +++ b/crates/color/src/lib.rs @@ -5,6 +5,8 @@ //! standard definitions of the "classic" photographic modes; they are applied to un-premultiplied //! colour and composited with Porter-Duff source-over on premultiplied pixels. +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + pub mod blend; pub mod icc; pub mod space; diff --git a/crates/export/src/lib.rs b/crates/export/src/lib.rs index 84cf40c3..77b48450 100644 --- a/crates/export/src/lib.rs +++ b/crates/export/src/lib.rs @@ -28,6 +28,8 @@ //! H.264 requires even dimensions: odd output sizes are cropped by one pixel (padded when the //! output is a single pixel wide/high). +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + mod encode; mod hevc_av1; mod out; diff --git a/crates/geom/src/lib.rs b/crates/geom/src/lib.rs index fda0ac01..a03c9d46 100644 --- a/crates/geom/src/lib.rs +++ b/crates/geom/src/lib.rs @@ -5,6 +5,8 @@ //! clockwise on screen, 3D uses a left-handed system with +z pointing into the screen, and a 3D //! layer's rotation is Orientation (X, Y, Z) followed by X Rotation, Y Rotation, Z Rotation. +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + use std::ops::{Add, AddAssign, Div, Mul, MulAssign, Neg, Sub, SubAssign}; use serde::{Deserialize, Serialize}; diff --git a/crates/host/src/lib.rs b/crates/host/src/lib.rs index 80d902e9..be26b169 100644 --- a/crates/host/src/lib.rs +++ b/crates/host/src/lib.rs @@ -3,6 +3,8 @@ //! Render Queue export through `effectcraft-export` (FilmCraft's encoders). Frontends (desktop, //! CLI, MCP, web) start here. +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + use std::sync::Arc; use effectcraft_engine::project::render_queue::OutputFormat; diff --git a/crates/model/src/lib.rs b/crates/model/src/lib.rs index 93a6a9f9..144f4e8e 100644 --- a/crates/model/src/lib.rs +++ b/crates/model/src/lib.rs @@ -12,6 +12,8 @@ //! Models are in their own units with +Y up (glTF's convention); the renderer maps them into //! After Effects' Y-down pixel space. +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + pub mod extrude; pub mod gltf; pub mod obj; diff --git a/crates/plugin/src/lib.rs b/crates/plugin/src/lib.rs index 1231d171..82996437 100644 --- a/crates/plugin/src/lib.rs +++ b/crates/plugin/src/lib.rs @@ -22,6 +22,8 @@ //! differently on another machine. The runtime is the `wasm` feature (on for the desktop app and //! the CLI); without it [`load_wasm`] says plug-ins are unavailable. +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + use effectcraft_effects::EffectSpec; pub use effectcraft_effects::plugin::{EffectPlugin, PLUGIN_API_VERSION, PluginFrame, PluginManifest, PluginParams, register_plugin}; @@ -62,5 +64,7 @@ pub fn loader(bytes: &[u8], source: &str) -> Result { })) } -#[cfg(all(test, feature = "wasm"))] +// Two attributes, so clippy sees `cfg(test)` and treats the module as test code. +#[cfg(test)] +#[cfg(feature = "wasm")] mod tests;