Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [lints] table, fix adding #![allow(clippy::type_complexity)] everywhere #10011

Merged
merged 13 commits into from
Nov 18, 2023
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ members = [
"errors",
]

[workspace.lints.clippy]
type_complexity = "allow"

[lints]
workspace = true

[features]
default = [
"animation",
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_a11y/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ bevy_derive = { path = "../bevy_derive", version = "0.12.0" }
bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" }

accesskit = "0.12"

[lints]
workspace = true
1 change: 0 additions & 1 deletion crates/bevy_a11y/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Accessibility for Bevy
#![warn(missing_docs)]
#![allow(clippy::type_complexity)]
#![forbid(unsafe_code)]

use std::sync::{
Expand Down
7 changes: 6 additions & 1 deletion crates/bevy_animation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" }
bevy_asset = { path = "../bevy_asset", version = "0.12.0" }
bevy_core = { path = "../bevy_core", version = "0.12.0" }
bevy_math = { path = "../bevy_math", version = "0.12.0" }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [
"bevy",
] }
bevy_render = { path = "../bevy_render", version = "0.12.0" }
bevy_time = { path = "../bevy_time", version = "0.12.0" }
bevy_utils = { path = "../bevy_utils", version = "0.12.0" }
bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" }
bevy_transform = { path = "../bevy_transform", version = "0.12.0" }
bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" }

[lints]
workspace = true
1 change: 0 additions & 1 deletion crates/bevy_animation/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Animation for the game engine Bevy
#![warn(missing_docs)]
#![allow(clippy::type_complexity)]

use std::ops::Deref;
use std::time::Duration;
Expand Down
4 changes: 3 additions & 1 deletion crates/bevy_app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ downcast-rs = "1.2.0"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = { version = "0.2" }
web-sys = { version = "0.3", features = [ "Window" ] }
web-sys = { version = "0.3", features = ["Window"] }

[lints]
workspace = true
1 change: 0 additions & 1 deletion crates/bevy_app/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! This crate is about everything concerning the highest-level, application layer of a Bevy app.
#![warn(missing_docs)]
#![allow(clippy::type_complexity)]

mod app;
mod main_schedule;
Expand Down
4 changes: 4 additions & 0 deletions crates/bevy_asset/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ js-sys = "0.3"

[dev-dependencies]
bevy_core = { path = "../bevy_core", version = "0.12.0" }

ameknite marked this conversation as resolved.
Show resolved Hide resolved

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/bevy_asset/macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" }
syn = "2.0"
proc-macro2 = "1.0"
quote = "1.0"

[lints]
workspace = true
2 changes: 0 additions & 2 deletions crates/bevy_asset/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::type_complexity)]

pub mod io;
pub mod meta;
pub mod processor;
Expand Down
11 changes: 9 additions & 2 deletions crates/bevy_audio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" }
bevy_asset = { path = "../bevy_asset", version = "0.12.0" }
bevy_ecs = { path = "../bevy_ecs", version = "0.12.0" }
bevy_math = { path = "../bevy_math", version = "0.12.0" }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [
"bevy",
] }
bevy_transform = { path = "../bevy_transform", version = "0.12.0" }
bevy_derive = { path = "../bevy_derive", version = "0.12.0" }
bevy_utils = { path = "../bevy_utils", version = "0.12.0" }
Expand All @@ -26,7 +28,9 @@ rodio = { version = "0.17", default-features = false }
oboe = { version = "0.5", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
rodio = { version = "0.17", default-features = false, features = ["wasm-bindgen"] }
rodio = { version = "0.17", default-features = false, features = [
ameknite marked this conversation as resolved.
Show resolved Hide resolved
"wasm-bindgen",
] }


[features]
Expand All @@ -43,3 +47,6 @@ symphonia-vorbis = ["rodio/symphonia-vorbis"]
symphonia-wav = ["rodio/symphonia-wav"]
# Enable using a shared stdlib for cxx on Android.
android_shared_stdcxx = ["oboe/shared-stdcxx"]

[lints]
workspace = true
1 change: 0 additions & 1 deletion crates/bevy_audio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
//! ```
#![forbid(unsafe_code)]
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

mod audio;
Expand Down
15 changes: 12 additions & 3 deletions crates/bevy_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ keywords = ["bevy"]

[dependencies]
# bevy
bevy_app = { path = "../bevy_app", version = "0.12.0", features = ["bevy_reflect"] }
bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = ["bevy_reflect"] }
bevy_app = { path = "../bevy_app", version = "0.12.0", features = [
"bevy_reflect",
] }
bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = [
"bevy_reflect",
] }
bevy_math = { path = "../bevy_math", version = "0.12.0" }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [
"bevy",
] }
bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" }
bevy_utils = { path = "../bevy_utils", version = "0.12.0" }

Expand All @@ -27,3 +33,6 @@ serialize = ["dep:serde"]

[dev-dependencies]
crossbeam-channel = "0.5.0"

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/bevy_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![warn(missing_docs)]
#![allow(clippy::type_complexity)]

//! This crate provides core functionality for Bevy Engine.
mod name;
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_core_pipeline/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.12.0" }
serde = { version = "1", features = ["derive"] }
bitflags = "2.3"
radsort = "0.1"

[lints]
workspace = true
2 changes: 0 additions & 2 deletions crates/bevy_core_pipeline/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::type_complexity)]

pub mod blit;
pub mod bloom;
pub mod clear_color;
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.12.0" }

quote = "1.0"
syn = { version = "2.0", features = ["full"] }

[lints]
workspace = true
2 changes: 0 additions & 2 deletions crates/bevy_derive/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::type_complexity)]

extern crate proc_macro;

mod app_plugin;
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_diagnostic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ sysinfo = { version = "0.29.0", default-features = false, features = [
# Only include when not bevy_dynamic_plugin and on linux/windows/android
[target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "android"))'.dependencies]
sysinfo = { version = "0.29.0", default-features = false }

[lints]
workspace = true
2 changes: 0 additions & 2 deletions crates/bevy_diagnostic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::type_complexity)]

mod diagnostic;
mod entity_count_diagnostics_plugin;
mod frame_time_diagnostics_plugin;
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_dylib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ crate-type = ["dylib"]

[dependencies]
bevy_internal = { path = "../bevy_internal", version = "0.12.0", default-features = false }

[lints]
workspace = true
1 change: 0 additions & 1 deletion crates/bevy_dylib/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![warn(missing_docs)]
#![allow(clippy::type_complexity)]
#![allow(clippy::single_component_path_imports)]

//! Forces dynamic linking of Bevy.
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_dynamic_plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ bevy_app = { path = "../bevy_app", version = "0.12.0" }
# other
libloading = { version = "0.8" }
thiserror = "1.0"

[lints]
workspace = true
2 changes: 0 additions & 2 deletions crates/bevy_dynamic_plugin/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::type_complexity)]

mod loader;

pub use loader::*;
3 changes: 3 additions & 0 deletions crates/bevy_ecs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ path = "examples/resources.rs"
[[example]]
name = "change_detection"
path = "examples/change_detection.rs"

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/bevy_ecs/macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.12.0" }
syn = "2.0"
quote = "1.0"
proc-macro2 = "1.0"

[lints]
workspace = true
1 change: 0 additions & 1 deletion crates/bevy_ecs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![warn(clippy::undocumented_unsafe_blocks)]
#![warn(missing_docs)]
#![allow(clippy::type_complexity)]
#![doc = include_str!("../README.md")]

#[cfg(target_pointer_width = "16")]
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_ecs_compile_fail_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ publish = false
[dev-dependencies]
bevy_ecs = { path = "../bevy_ecs" }
trybuild = "1.0.71"

[lints]
workspace = true
2 changes: 0 additions & 2 deletions crates/bevy_ecs_compile_fail_tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
#![allow(clippy::type_complexity)]

// Nothing here, check out the integration tests
3 changes: 3 additions & 0 deletions crates/bevy_encase_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ proc-macro = true
[dependencies]
bevy_macro_utils = { path = "../bevy_macro_utils", version = "0.12.0" }
encase_derive_impl = "0.6.1"

[lints]
workspace = true
2 changes: 0 additions & 2 deletions crates/bevy_encase_derive/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::type_complexity)]

use bevy_macro_utils::BevyManifest;
use encase_derive_impl::{implement, syn};

Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_gilrs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ bevy_time = { path = "../bevy_time", version = "0.12.0" }
# other
gilrs = "0.10.1"
thiserror = "1.0"

[lints]
workspace = true
1 change: 0 additions & 1 deletion crates/bevy_gilrs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
//! This crate is built on top of [GilRs](gilrs), a library
//! that handles abstracting over platform-specific gamepad APIs.
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

mod converter;
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_gizmos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ bevy_core = { path = "../bevy_core", version = "0.12.0" }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0" }
bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.12.0" }
bevy_transform = { path = "../bevy_transform", version = "0.12.0" }

[lints]
workspace = true
1 change: 0 additions & 1 deletion crates/bevy_gizmos/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

//! This crate adds an immediate mode drawing api to Bevy for visual debugging.
Expand Down
11 changes: 9 additions & 2 deletions crates/bevy_gltf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.12.0" }
bevy_log = { path = "../bevy_log", version = "0.12.0" }
bevy_math = { path = "../bevy_math", version = "0.12.0" }
bevy_pbr = { path = "../bevy_pbr", version = "0.12.0" }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [
"bevy",
] }
bevy_render = { path = "../bevy_render", version = "0.12.0" }
bevy_scene = { path = "../bevy_scene", version = "0.12.0", features = ["bevy_render"] }
bevy_scene = { path = "../bevy_scene", version = "0.12.0", features = [
"bevy_render",
] }
bevy_transform = { path = "../bevy_transform", version = "0.12.0" }
bevy_tasks = { path = "../bevy_tasks", version = "0.12.0" }
bevy_utils = { path = "../bevy_utils", version = "0.12.0" }
Expand All @@ -47,3 +51,6 @@ base64 = "0.13.0"
percent-encoding = "2.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/bevy_gltf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! for loading glTF 2.0 (a standard 3D scene definition format) files in Bevy.
//!
//! The [glTF 2.0 specification](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html) defines the format of the glTF files.
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

#[cfg(feature = "bevy_animation")]
Expand Down
11 changes: 9 additions & 2 deletions crates/bevy_hierarchy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@ trace = []
# bevy
bevy_app = { path = "../bevy_app", version = "0.12.0" }
bevy_core = { path = "../bevy_core", version = "0.12.0" }
bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = ["bevy_reflect"] }
bevy_ecs = { path = "../bevy_ecs", version = "0.12.0", features = [
"bevy_reflect",
] }
bevy_log = { path = "../bevy_log", version = "0.12.0" }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = ["bevy"] }
bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [
"bevy",
] }
bevy_utils = { path = "../bevy_utils", version = "0.12.0" }

# other
smallvec = { version = "1.6", features = ["serde", "union", "const_generics"] }

[lints]
workspace = true
1 change: 0 additions & 1 deletion crates/bevy_hierarchy/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]
//! `bevy_hierarchy` can be used to define hierarchies of entities.
//!
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_input/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ thiserror = "1.0"

[dev-dependencies]
bevy = { path = "../../", version = "0.12.0" }

[lints]
workspace = true
1 change: 0 additions & 1 deletion crates/bevy_input/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![allow(clippy::type_complexity)]
#![warn(missing_docs)]

//! Input functionality for the [Bevy game engine](https://bevyengine.org/).
Expand Down
Loading
Loading