From ba9e0eb6672f21d8cf7b7c4ef7938daece6f30cb Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 13 Apr 2026 11:57:34 +0200 Subject: [PATCH] Add taplo-fmt CI step (#8095) --- .github/workflows/taplo.yml | 25 +++++++++++++++++++++++++ Cargo.toml | 8 ++++++-- crates/egui_glow/Cargo.toml | 9 +++++++-- crates/egui_kittest/Cargo.toml | 2 +- crates/epaint/Cargo.toml | 9 ++++++++- 5 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/taplo.yml diff --git a/.github/workflows/taplo.yml b/.github/workflows/taplo.yml new file mode 100644 index 000000000..11a7b978a --- /dev/null +++ b/.github/workflows/taplo.yml @@ -0,0 +1,25 @@ +# Checks that all TOML files are formatted with taplo. +name: Taplo + +on: + push: + branches: + - "main" + pull_request: + types: [opened, synchronize] + +jobs: + taplo: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Taplo + uses: taiki-e/install-action@v2.48.7 + with: + tool: taplo-cli@0.9.3 + + - name: Check TOML formatting + run: | + taplo fmt --check diff --git a/Cargo.toml b/Cargo.toml index 0e592637c..4559152a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -134,12 +134,16 @@ syntect = { version = "5.3.0", default-features = false } tempfile = "3.23.0" thiserror = "2.0.17" tokio = "1.49" -toml = {version = "1.0.0", default-features = false } +toml = { version = "1.0.0", default-features = false } type-map = "0.5.1" unicode_names2 = { version = "2.0.0", default-features = false } unicode-general-category = "1.1.0" unicode-segmentation = "1.12.0" -vello_cpu = { version = "0.0.7", default-features = false, features = ["std", "u8_pipeline", "f32_pipeline"] } +vello_cpu = { version = "0.0.7", default-features = false, features = [ + "std", + "u8_pipeline", + "f32_pipeline", +] } wasm-bindgen = "0.2.108" # Keep wasm-bindgen version in sync in: setup_web.sh, Cargo.toml, Cargo.lock, rust.yml. Don't update this spuriously, because of https://github.com/rerun-io/rerun/issues/8766 wasm-bindgen-futures = "0.4.58" wayland-cursor = { version = "0.31.11", default-features = false } diff --git a/crates/egui_glow/Cargo.toml b/crates/egui_glow/Cargo.toml index f714dd8e0..c5ff714b3 100644 --- a/crates/egui_glow/Cargo.toml +++ b/crates/egui_glow/Cargo.toml @@ -11,7 +11,13 @@ readme = "README.md" repository = "https://github.com/emilk/egui/tree/main/crates/egui_glow" categories = ["gui", "game-development"] keywords = ["glow", "egui", "gui", "gamedev"] -include = ["../../LICENSE-APACHE", "../../LICENSE-MIT", "**/*.rs", "Cargo.toml", "src/shader/*.glsl"] +include = [ + "../../LICENSE-APACHE", + "../../LICENSE-MIT", + "**/*.rs", + "Cargo.toml", + "src/shader/*.glsl", +] [lints] workspace = true @@ -65,7 +71,6 @@ winit = { workspace = true, optional = true, default-features = false, features web-sys = { workspace = true, features = ["console"] } wasm-bindgen.workspace = true - [dev-dependencies] glutin = { workspace = true, default-features = true } # examples/pure_glow glutin-winit = { workspace = true, default-features = true } diff --git a/crates/egui_kittest/Cargo.toml b/crates/egui_kittest/Cargo.toml index 10938cd37..2d26e6bd8 100644 --- a/crates/egui_kittest/Cargo.toml +++ b/crates/egui_kittest/Cargo.toml @@ -38,7 +38,7 @@ egui.workspace = true eframe = { workspace = true, optional = true } kittest.workspace = true serde.workspace = true -toml = {workspace = true, features = ["parse", "serde"] } +toml = { workspace = true, features = ["parse", "serde"] } # wgpu dependencies egui-wgpu = { workspace = true, optional = true } diff --git a/crates/epaint/Cargo.toml b/crates/epaint/Cargo.toml index 705f1f6a9..f16903730 100644 --- a/crates/epaint/Cargo.toml +++ b/crates/epaint/Cargo.toml @@ -48,7 +48,14 @@ mint = ["emath/mint"] rayon = ["dep:rayon"] ## Allow serialization using [`serde`](https://docs.rs/serde). -serde = ["dep:serde", "ahash/serde", "emath/serde", "ecolor/serde", "font-types/serde", "smallvec/serde"] +serde = [ + "dep:serde", + "ahash/serde", + "ecolor/serde", + "emath/serde", + "font-types/serde", + "smallvec/serde", +] ## Change Vertex layout to be compatible with unity unity = []