Add a [lints] entry for workspace members missing it (#11900)

# Objective

- Some workspace members do not inherit the global lints.

## Solution

- Add a `[lints]` entry for all files returned by `rg
--files-without-match -F "[lints]" **/Cargo.toml`, except the compile
failure tests since these aren't part of the workspace.
- Add some docstrings where needed.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This commit is contained in:
Kanabenki 2024-02-19 18:09:47 +01:00 committed by GitHub
parent 0dccfb5788
commit f77618eccb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 33 additions and 1 deletions

View file

@ -11,6 +11,9 @@ keywords = ["bevy"]
[lib] [lib]
proc-macro = true proc-macro = true
[lints]
workspace = true
[dependencies] [dependencies]
bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.13.0" } bevy_macro_utils = { path = "../../bevy_macro_utils", version = "0.13.0" }

View file

@ -1,8 +1,11 @@
//! Derive implementations for `bevy_gizmos`.
use bevy_macro_utils::BevyManifest; use bevy_macro_utils::BevyManifest;
use proc_macro::TokenStream; use proc_macro::TokenStream;
use quote::quote; use quote::quote;
use syn::{parse_macro_input, parse_quote, DeriveInput, Path}; use syn::{parse_macro_input, parse_quote, DeriveInput, Path};
/// Implements the [`GizmoConfigGroup`] trait for a gizmo config group type.
#[proc_macro_derive(GizmoConfigGroup)] #[proc_macro_derive(GizmoConfigGroup)]
pub fn derive_gizmo_config_group(input: TokenStream) -> TokenStream { pub fn derive_gizmo_config_group(input: TokenStream) -> TokenStream {
let mut ast = parse_macro_input!(input as DeriveInput); let mut ast = parse_macro_input!(input as DeriveInput);

View file

@ -6,5 +6,8 @@ description = "Bevy's error codes"
publish = false publish = false
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
[lints]
workspace = true
[dependencies] [dependencies]
bevy = { path = ".." } bevy = { path = ".." }

View file

@ -1,3 +1,7 @@
//! Definitions of Bevy's error codes that might occur at runtime.
//!
//! These either manifest as a warning or a panic.
#[doc = include_str!("../B0001.md")] #[doc = include_str!("../B0001.md")]
pub struct B0001; pub struct B0001;

View file

@ -6,6 +6,9 @@ description = "handle templated pages in Bevy repository"
publish = false publish = false
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
[lints]
workspace = true
[dependencies] [dependencies]
toml_edit = { version = "0.22", default-features = false, features = ["parse"] } toml_edit = { version = "0.22", default-features = false, features = ["parse"] }
tera = "1.15" tera = "1.15"

View file

@ -1,3 +1,5 @@
//! Tool used to build the templated pages of the Bevy website.
use bitflags::bitflags; use bitflags::bitflags;
mod examples; mod examples;

View file

@ -5,7 +5,9 @@ edition = "2021"
description = "Build an example for wasm" description = "Build an example for wasm"
publish = false publish = false
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints]
workspace = true
[dependencies] [dependencies]
xshell = "0.2" xshell = "0.2"

View file

@ -1,3 +1,5 @@
//! Tool used to build Bevy examples for wasm.
use std::{fs::File, io::Write}; use std::{fs::File, io::Write};
use clap::{Parser, ValueEnum}; use clap::{Parser, ValueEnum};

View file

@ -6,6 +6,9 @@ description = "CI script for Bevy"
publish = false publish = false
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
[lints]
workspace = true
[dependencies] [dependencies]
xshell = "0.2" xshell = "0.2"
bitflags = "2.3" bitflags = "2.3"

View file

@ -1,3 +1,5 @@
//! CI script used for Bevy.
use xshell::{cmd, Shell}; use xshell::{cmd, Shell};
use bitflags::bitflags; use bitflags::bitflags;

View file

@ -6,6 +6,9 @@ description = "Run examples"
publish = false publish = false
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
[lints]
workspace = true
[dependencies] [dependencies]
xshell = "0.2" xshell = "0.2"
clap = { version = "4.0", features = ["derive"] } clap = { version = "4.0", features = ["derive"] }

View file

@ -1,3 +1,5 @@
//! Tool to run all examples or generate a showcase page for the Bevy website.
use std::{ use std::{
collections::{hash_map::DefaultHasher, HashMap}, collections::{hash_map::DefaultHasher, HashMap},
fmt::Display, fmt::Display,