Skip to content

Commit

Permalink
Add TOML formatting with Taplo
Browse files Browse the repository at this point in the history
Add Taplo config.
Format TOM config files.
Add Taplo step to CI.
  • Loading branch information
PoignardAzur committed Dec 11, 2024
1 parent 8e05367 commit bbf5130
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 47 deletions.
8 changes: 8 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[formatting]
# This is a matter of taste, but expanded inline arrays make tables harder to read.
array_auto_collapse = true
inline_table_expand = false

# Aligning comments with the largest line creates
# diff noise when neighboring lines are changed.
align_comments = false
20 changes: 10 additions & 10 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

[default]
extend-ignore-re = [
# Matches lorem ipsum text.
# In general, regexes are only matched until the end of a line by typos,
# and the repeated matcher at the end of both of these also ensures that
# matching ends at quotes or symbols commonly used to terminate comments.
"Lorem ipsum [a-zA-Z .,]*",
"Phasellus in viverra dolor [a-zA-Z .,]*",
# Matches lorem ipsum text.
# In general, regexes are only matched until the end of a line by typos,
# and the repeated matcher at the end of both of these also ensures that
# matching ends at quotes or symbols commonly used to terminate comments.
"Lorem ipsum [a-zA-Z .,]*",
"Phasellus in viverra dolor [a-zA-Z .,]*",
]

# Corrections take the form of a key/value pair. The key is the incorrect word
Expand All @@ -28,8 +28,8 @@ seeked = "seeked" # Part of the HTML standard
# Include .github, .cargo, etc.
ignore-hidden = false
extend-exclude = [
"masonry/resources/i18n",
# /.git isn't in .gitignore, because git never tracks it.
# Typos doesn't know that, though.
"/.git",
"masonry/resources/i18n",
# /.git isn't in .gitignore, because git never tracks it.
# Typos doesn't know that, though.
"/.git",
]
39 changes: 17 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[workspace]
resolver = "2"
members = [
"xilem",
"xilem_core",
"masonry",
"xilem",
"xilem_core",
"masonry",

"xilem_web",
"xilem_web/web_examples/counter",
"xilem_web/web_examples/counter_custom_element",
"xilem_web/web_examples/elm",
"xilem_web/web_examples/fetch",
"xilem_web/web_examples/todomvc",
"xilem_web/web_examples/mathml_svg",
"xilem_web/web_examples/raw_dom_access",
"xilem_web/web_examples/spawn_tasks",
"xilem_web/web_examples/svgtoy",
"xilem_web/web_examples/svgdraw",
"tree_arena",
"xilem_web",
"xilem_web/web_examples/counter",
"xilem_web/web_examples/counter_custom_element",
"xilem_web/web_examples/elm",
"xilem_web/web_examples/fetch",
"xilem_web/web_examples/todomvc",
"xilem_web/web_examples/mathml_svg",
"xilem_web/web_examples/raw_dom_access",
"xilem_web/web_examples/spawn_tasks",
"xilem_web/web_examples/svgtoy",
"xilem_web/web_examples/svgdraw",
"tree_arena",
]

[workspace.package]
Expand All @@ -35,10 +35,7 @@ homepage = "https://xilem.dev/"
rust.unsafe_code = "deny"

# Intentional break from the lint set. Intended to be temporary
rust.unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(FALSE)',
'cfg(tarpaulin_include)',
] }
rust.unexpected_cfgs = { level = "warn", check-cfg = ['cfg(FALSE)', 'cfg(tarpaulin_include)'] }

# LINEBENDER LINT SET - Cargo.toml - v2
# See https://linebender.org/wiki/canonical-lints/
Expand Down Expand Up @@ -110,9 +107,7 @@ tree_arena = { version = "0.1.0", path = "tree_arena" }
vello = "0.3"
wgpu = "22.1.0"
kurbo = "0.11.1"
parley = { git = "https://github.com/linebender/parley", rev = "211878fae20ba8b4bf4dcc39e6bf790eece8aa03", features = [
"accesskit",
] }
parley = { git = "https://github.com/linebender/parley", rev = "211878fae20ba8b4bf4dcc39e6bf790eece8aa03", features = ["accesskit"] }
peniko = "0.2.0"
winit = "0.30.4"
tracing = { version = "0.1.40", default-features = false }
Expand Down
10 changes: 5 additions & 5 deletions masonry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ default = []
# Enables tracing using tracy if the default Masonry tracing is used.
# https://github.com/wolfpld/tracy can be connected to when this feature is enabled.
tracy = [
"tracing-tracy/enable",
"dep:tracing-tracy",
"dep:wgpu-profiler",
"wgpu-profiler/tracy",
"vello/wgpu-profiler",
"tracing-tracy/enable",
"dep:tracing-tracy",
"dep:wgpu-profiler",
"wgpu-profiler/tracy",
"vello/wgpu-profiler",
]

[lints]
Expand Down
13 changes: 4 additions & 9 deletions xilem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,17 @@ tracing.workspace = true
vello.workspace = true
smallvec.workspace = true
accesskit.workspace = true
tokio = { version = "1.39.1", features = [
"rt",
"rt-multi-thread",
"time",
"sync",
] }
tokio = { version = "1.39.1", features = ["rt", "rt-multi-thread", "time", "sync"] }

[dev-dependencies]
# Used for `variable_clock`
time = { workspace = true, features = ["local-offset"] }

# Used for http_cats
reqwest = { version = "0.12.7", default-features = false, features = [
# We use rustls as Android doesn't ship with openssl
# and this is likely to be easiest to get working.
"rustls-tls",
# We use rustls as Android doesn't ship with openssl
# and this is likely to be easiest to get working.
"rustls-tls",
] }
image = { workspace = true, features = ["jpeg"] }

Expand Down
2 changes: 1 addition & 1 deletion xilem_web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
description = "HTML DOM frontend for the Xilem Rust UI framework."
keywords = ["xilem", "html", "svg", "dom", "web", "ui"]
categories = ["gui", "web-programming"]
publish = false # Until it's ready
publish = false # Until it's ready
edition.workspace = true
license.workspace = true
repository.workspace = true
Expand Down

0 comments on commit bbf5130

Please sign in to comment.