diff --git a/Cargo.toml b/Cargo.toml index bc119391..10b4cc5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,3 +12,28 @@ members = ["crates/*"] [[bin]] name = "bevy_editor_standalone" path = "crates/bevy_editor/src/main.rs" + +[workspace.lints.clippy] +doc_markdown = "warn" +manual_let_else = "warn" +match_same_arms = "warn" +redundant_closure_for_method_calls = "warn" +redundant_else = "warn" +semicolon_if_nothing_returned = "warn" +type_complexity = "allow" +undocumented_unsafe_blocks = "warn" +unwrap_or_default = "warn" + +ptr_as_ptr = "warn" +ptr_cast_constness = "warn" +ref_as_ptr = "warn" + +[workspace.lints.rust] +missing_docs = "warn" +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(docsrs_dep)'] } +unsafe_code = "deny" +unsafe_op_in_unsafe_fn = "warn" +unused_qualifications = "warn" + +[lints] +workspace = true diff --git a/crates/bevy_color_picker/Cargo.toml b/crates/bevy_color_picker/Cargo.toml index c71957ba..db74b8b2 100644 --- a/crates/bevy_color_picker/Cargo.toml +++ b/crates/bevy_color_picker/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_color_picker/src/lib.rs b/crates/bevy_color_picker/src/lib.rs index 81481a52..6996e526 100644 --- a/crates/bevy_color_picker/src/lib.rs +++ b/crates/bevy_color_picker/src/lib.rs @@ -1,5 +1,6 @@ //! A color picker widget for Bevy applications. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_command_palette/Cargo.toml b/crates/bevy_command_palette/Cargo.toml index 2ef2f3df..61577ac1 100644 --- a/crates/bevy_command_palette/Cargo.toml +++ b/crates/bevy_command_palette/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_command_palette/src/lib.rs b/crates/bevy_command_palette/src/lib.rs index c9a0d638..b7bda56f 100644 --- a/crates/bevy_command_palette/src/lib.rs +++ b/crates/bevy_command_palette/src/lib.rs @@ -5,6 +5,7 @@ //! //! Search and keyboard shortcuts will both be supported. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_context_menu/Cargo.toml b/crates/bevy_context_menu/Cargo.toml index 634f6588..ffa5a67d 100644 --- a/crates/bevy_context_menu/Cargo.toml +++ b/crates/bevy_context_menu/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_context_menu/src/lib.rs b/crates/bevy_context_menu/src/lib.rs index 895266ae..60720528 100644 --- a/crates/bevy_context_menu/src/lib.rs +++ b/crates/bevy_context_menu/src/lib.rs @@ -3,6 +3,7 @@ //! This crate opens up a menu with a list of options when the user right-clicks (or otherwise triggers the context menu), //! based on what the user has clicked on. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_editor/Cargo.toml b/crates/bevy_editor/Cargo.toml index e3c7efbc..d22811c2 100644 --- a/crates/bevy_editor/Cargo.toml +++ b/crates/bevy_editor/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_editor_camera/Cargo.toml b/crates/bevy_editor_camera/Cargo.toml index fa8a23df..dc1ec25e 100644 --- a/crates/bevy_editor_camera/Cargo.toml +++ b/crates/bevy_editor_camera/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_editor_camera/src/lib.rs b/crates/bevy_editor_camera/src/lib.rs index 812058d9..222029e2 100644 --- a/crates/bevy_editor_camera/src/lib.rs +++ b/crates/bevy_editor_camera/src/lib.rs @@ -1,5 +1,6 @@ //! A set of camera controllers suitable for controlling editor-style views and scene exploration. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_inspector/Cargo.toml b/crates/bevy_inspector/Cargo.toml index 8fce12b2..e084d3e3 100644 --- a/crates/bevy_inspector/Cargo.toml +++ b/crates/bevy_inspector/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_inspector/src/lib.rs b/crates/bevy_inspector/src/lib.rs index d7419fff..6ef72e49 100644 --- a/crates/bevy_inspector/src/lib.rs +++ b/crates/bevy_inspector/src/lib.rs @@ -2,6 +2,7 @@ //! //! Data can be viewed and modified in real-time, with changes being reflected in the application. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_localization/Cargo.toml b/crates/bevy_localization/Cargo.toml index 1c8e28bb..d87bba17 100644 --- a/crates/bevy_localization/Cargo.toml +++ b/crates/bevy_localization/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_localization/src/lib.rs b/crates/bevy_localization/src/lib.rs index d5930782..fc729f80 100644 --- a/crates/bevy_localization/src/lib.rs +++ b/crates/bevy_localization/src/lib.rs @@ -1,5 +1,6 @@ //! A localization framework for Bevy applications, backed by Fluent. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_menu_bar/Cargo.toml b/crates/bevy_menu_bar/Cargo.toml index c450b4b9..1218f26c 100644 --- a/crates/bevy_menu_bar/Cargo.toml +++ b/crates/bevy_menu_bar/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_menu_bar/src/lib.rs b/crates/bevy_menu_bar/src/lib.rs index 11a325c6..d358d52d 100644 --- a/crates/bevy_menu_bar/src/lib.rs +++ b/crates/bevy_menu_bar/src/lib.rs @@ -3,6 +3,7 @@ //! This runs along the top of the screen and provides a list of options to the user, //! such as "File", "Edit", "View", etc. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_panes/Cargo.toml b/crates/bevy_panes/Cargo.toml index f3607a7d..97c432a9 100644 --- a/crates/bevy_panes/Cargo.toml +++ b/crates/bevy_panes/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_panes/src/lib.rs b/crates/bevy_panes/src/lib.rs index 1b420a1a..45b28474 100644 --- a/crates/bevy_panes/src/lib.rs +++ b/crates/bevy_panes/src/lib.rs @@ -1,5 +1,6 @@ //! Resizable, draggable, collapsible and dockable panes for Bevy. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_preferences/Cargo.toml b/crates/bevy_preferences/Cargo.toml index 855906cc..b55f2993 100644 --- a/crates/bevy_preferences/Cargo.toml +++ b/crates/bevy_preferences/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_preferences/src/lib.rs b/crates/bevy_preferences/src/lib.rs index e7c1dde4..a4ea4cc3 100644 --- a/crates/bevy_preferences/src/lib.rs +++ b/crates/bevy_preferences/src/lib.rs @@ -1,5 +1,6 @@ //! A straightforward way to store and retrieve user preferences on disk for Bevy applications. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_scene_tree/Cargo.toml b/crates/bevy_scene_tree/Cargo.toml index e4014a38..4dff725d 100644 --- a/crates/bevy_scene_tree/Cargo.toml +++ b/crates/bevy_scene_tree/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_scene_tree/src/lib.rs b/crates/bevy_scene_tree/src/lib.rs index 6f27289e..835d63ce 100644 --- a/crates/bevy_scene_tree/src/lib.rs +++ b/crates/bevy_scene_tree/src/lib.rs @@ -1,5 +1,6 @@ //! An interactive, collapsible tree view for hierarchical ECS data in Bevy. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_toolbar/Cargo.toml b/crates/bevy_toolbar/Cargo.toml index b1d36102..33905523 100644 --- a/crates/bevy_toolbar/Cargo.toml +++ b/crates/bevy_toolbar/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_toolbar/src/lib.rs b/crates/bevy_toolbar/src/lib.rs index 399559c1..40a3d0fb 100644 --- a/crates/bevy_toolbar/src/lib.rs +++ b/crates/bevy_toolbar/src/lib.rs @@ -3,6 +3,7 @@ //! Toolbars are a common UI element in many applications, providing quick access to frequently used commands, //! and typically display small icons with on-hover tooltips. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_tooltips/Cargo.toml b/crates/bevy_tooltips/Cargo.toml index 7e6885d5..70b968bf 100644 --- a/crates/bevy_tooltips/Cargo.toml +++ b/crates/bevy_tooltips/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_tooltips/src/lib.rs b/crates/bevy_tooltips/src/lib.rs index 9e989b02..1b1a68ca 100644 --- a/crates/bevy_tooltips/src/lib.rs +++ b/crates/bevy_tooltips/src/lib.rs @@ -1,5 +1,6 @@ //! A tooltip system for Bevy applications, providing contextual information on hover. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_undo/Cargo.toml b/crates/bevy_undo/Cargo.toml index c53a521c..fc38d2ca 100644 --- a/crates/bevy_undo/Cargo.toml +++ b/crates/bevy_undo/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_undo/src/lib.rs b/crates/bevy_undo/src/lib.rs index 40326347..50d4b3b6 100644 --- a/crates/bevy_undo/src/lib.rs +++ b/crates/bevy_undo/src/lib.rs @@ -1,5 +1,6 @@ //! An action-based undo-redo system for Bevy ECS data. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right } diff --git a/crates/bevy_widgets/Cargo.toml b/crates/bevy_widgets/Cargo.toml index 27d005b5..b1484bea 100644 --- a/crates/bevy_widgets/Cargo.toml +++ b/crates/bevy_widgets/Cargo.toml @@ -4,3 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] + +[lints] +workspace = true diff --git a/crates/bevy_widgets/src/lib.rs b/crates/bevy_widgets/src/lib.rs index b98fe122..8d41bad0 100644 --- a/crates/bevy_widgets/src/lib.rs +++ b/crates/bevy_widgets/src/lib.rs @@ -1,5 +1,6 @@ //! A collection of basic UI widgets for Bevy applications. +/// an add function that adds two numbers pub fn add(left: u64, right: u64) -> u64 { left + right }