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 TOML formatting with Taplo #784

Merged
merged 7 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ jobs:
- name: Run cargo fmt
run: cargo fmt --all --check

- name: Install Taplo
uses: uncenter/setup-taplo@09968a8ae38d66ddd3d23802c44bf6122d7aa991 # v1
with:
version: "0.9.3"

- name: Run taplo fmt
run: taplo fmt --check --diff

- name: Install ripgrep
run: |
sudo apt update
Expand Down
11 changes: 11 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See https://taplo.tamasfe.dev/configuration/file.html
# and https://taplo.tamasfe.dev/configuration/formatter-options.html

[formatting]
# Aligning comments with the largest line creates
# diff noise when neighboring lines are changed.
align_comments = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

xStrom marked this conversation as resolved.
Show resolved Hide resolved

# Matches how rustfmt formats Rust code
column_width = 100
indent_string = " "
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 1 addition & 6 deletions xilem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,7 @@ 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`
Expand Down
294 changes: 147 additions & 147 deletions 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 All @@ -30,152 +30,152 @@ xilem_core = { workspace = true, features = ["kurbo"] }
[dependencies.web-sys]
version = "0.3.69"
features = [
"console",
"CssStyleDeclaration",
"Document",
"DocumentFragment",
"DomTokenList",
"Element",
"Event",
"AddEventListenerOptions",
"HtmlElement",
"Node",
"NodeList",
"ResizeObserver",
"ResizeObserverEntry",
"DomRectReadOnly",
"MathMlElement",
"SvgElement",
"SvgaElement",
"SvgAnimateElement",
"SvgAnimateMotionElement",
"SvgAnimateTransformElement",
"SvgCircleElement",
"SvgClipPathElement",
"SvgDefsElement",
"SvgDescElement",
"SvgEllipseElement",
"SvgfeBlendElement",
"SvgfeColorMatrixElement",
"SvgfeComponentTransferElement",
"SvgfeCompositeElement",
"SvgfeConvolveMatrixElement",
"SvgfeDiffuseLightingElement",
"SvgfeDisplacementMapElement",
"SvgfeDistantLightElement",
"SvgfeDropShadowElement",
"SvgfeFloodElement",
"SvgfeFuncAElement",
"SvgfeFuncBElement",
"SvgfeFuncGElement",
"SvgfeFuncRElement",
"SvgfeGaussianBlurElement",
"SvgfeImageElement",
"SvgfeMergeElement",
"SvgfeMergeNodeElement",
"SvgfeMorphologyElement",
"SvgfeOffsetElement",
"SvgfePointLightElement",
"SvgfeSpecularLightingElement",
"SvgfeSpotLightElement",
"SvgfeTileElement",
"SvgfeTurbulenceElement",
"SvgFilterElement",
"SvgForeignObjectElement",
"SvggElement",
# "SvgHatchElement",
# "SvgHatchpathElement",
"SvgImageElement",
"SvgLineElement",
"SvgLinearGradientElement",
"SvgMarkerElement",
"SvgMaskElement",
"SvgMetadataElement",
"SvgmPathElement",
"SvgPathElement",
"SvgPatternElement",
"SvgPolygonElement",
"SvgPolylineElement",
"SvgRadialGradientElement",
"SvgRectElement",
"SvgScriptElement",
"SvgSetElement",
"SvgStopElement",
"SvgStyleElement",
"SvgsvgElement",
"SvgSwitchElement",
"SvgSymbolElement",
"SvgTextElement",
"SvgTextPathElement",
"SvgTitleElement",
"SvgtSpanElement",
"SvgUseElement",
"SvgViewElement",
"Text",
"Window",
"FocusEvent",
"HtmlInputElement",
"InputEvent",
"KeyboardEvent",
"MouseEvent",
"PointerEvent",
"WheelEvent",
"HtmlAnchorElement",
"HtmlAreaElement",
"HtmlAudioElement",
"HtmlBrElement",
"HtmlButtonElement",
"HtmlCanvasElement",
"HtmlDataElement",
"HtmlDataListElement",
"HtmlDetailsElement",
"HtmlDialogElement",
"HtmlDivElement",
"HtmlDListElement",
"HtmlEmbedElement",
"HtmlFieldSetElement",
"HtmlFormElement",
"HtmlHeadingElement",
"HtmlHrElement",
"HtmlIFrameElement",
"HtmlImageElement",
"HtmlInputElement",
"HtmlLabelElement",
"HtmlLegendElement",
"HtmlLiElement",
"HtmlLinkElement",
"HtmlMapElement",
"HtmlMediaElement",
"HtmlMenuElement",
"HtmlMeterElement",
"HtmlModElement",
"HtmlObjectElement",
"HtmlOListElement",
"HtmlOptGroupElement",
"HtmlOptionElement",
"HtmlOutputElement",
"HtmlParagraphElement",
"HtmlPictureElement",
"HtmlPreElement",
"HtmlProgressElement",
"HtmlQuoteElement",
"HtmlScriptElement",
"HtmlSelectElement",
"HtmlSlotElement",
"HtmlSourceElement",
"HtmlSpanElement",
"HtmlTableCaptionElement",
"HtmlTableCellElement",
"HtmlTableColElement",
"HtmlTableElement",
"HtmlTableRowElement",
"HtmlTableSectionElement",
"HtmlTemplateElement",
"HtmlTimeElement",
"HtmlTextAreaElement",
"HtmlTrackElement",
"HtmlUListElement",
"HtmlVideoElement",
"console",
"CssStyleDeclaration",
"Document",
"DocumentFragment",
"DomTokenList",
"Element",
"Event",
"AddEventListenerOptions",
"HtmlElement",
"Node",
"NodeList",
"ResizeObserver",
"ResizeObserverEntry",
"DomRectReadOnly",
"MathMlElement",
"SvgElement",
"SvgaElement",
"SvgAnimateElement",
"SvgAnimateMotionElement",
"SvgAnimateTransformElement",
"SvgCircleElement",
"SvgClipPathElement",
"SvgDefsElement",
"SvgDescElement",
"SvgEllipseElement",
"SvgfeBlendElement",
"SvgfeColorMatrixElement",
"SvgfeComponentTransferElement",
"SvgfeCompositeElement",
"SvgfeConvolveMatrixElement",
"SvgfeDiffuseLightingElement",
"SvgfeDisplacementMapElement",
"SvgfeDistantLightElement",
"SvgfeDropShadowElement",
"SvgfeFloodElement",
"SvgfeFuncAElement",
"SvgfeFuncBElement",
"SvgfeFuncGElement",
"SvgfeFuncRElement",
"SvgfeGaussianBlurElement",
"SvgfeImageElement",
"SvgfeMergeElement",
"SvgfeMergeNodeElement",
"SvgfeMorphologyElement",
"SvgfeOffsetElement",
"SvgfePointLightElement",
"SvgfeSpecularLightingElement",
"SvgfeSpotLightElement",
"SvgfeTileElement",
"SvgfeTurbulenceElement",
"SvgFilterElement",
"SvgForeignObjectElement",
"SvggElement",
# "SvgHatchElement",
# "SvgHatchpathElement",
"SvgImageElement",
"SvgLineElement",
"SvgLinearGradientElement",
"SvgMarkerElement",
"SvgMaskElement",
"SvgMetadataElement",
"SvgmPathElement",
"SvgPathElement",
"SvgPatternElement",
"SvgPolygonElement",
"SvgPolylineElement",
"SvgRadialGradientElement",
"SvgRectElement",
"SvgScriptElement",
"SvgSetElement",
"SvgStopElement",
"SvgStyleElement",
"SvgsvgElement",
"SvgSwitchElement",
"SvgSymbolElement",
"SvgTextElement",
"SvgTextPathElement",
"SvgTitleElement",
"SvgtSpanElement",
"SvgUseElement",
"SvgViewElement",
"Text",
"Window",
"FocusEvent",
"HtmlInputElement",
"InputEvent",
"KeyboardEvent",
"MouseEvent",
"PointerEvent",
"WheelEvent",
"HtmlAnchorElement",
"HtmlAreaElement",
"HtmlAudioElement",
"HtmlBrElement",
"HtmlButtonElement",
"HtmlCanvasElement",
"HtmlDataElement",
"HtmlDataListElement",
"HtmlDetailsElement",
"HtmlDialogElement",
"HtmlDivElement",
"HtmlDListElement",
"HtmlEmbedElement",
"HtmlFieldSetElement",
"HtmlFormElement",
"HtmlHeadingElement",
"HtmlHrElement",
"HtmlIFrameElement",
"HtmlImageElement",
"HtmlInputElement",
"HtmlLabelElement",
"HtmlLegendElement",
"HtmlLiElement",
"HtmlLinkElement",
"HtmlMapElement",
"HtmlMediaElement",
"HtmlMenuElement",
"HtmlMeterElement",
"HtmlModElement",
"HtmlObjectElement",
"HtmlOListElement",
"HtmlOptGroupElement",
"HtmlOptionElement",
"HtmlOutputElement",
"HtmlParagraphElement",
"HtmlPictureElement",
"HtmlPreElement",
"HtmlProgressElement",
"HtmlQuoteElement",
"HtmlScriptElement",
"HtmlSelectElement",
"HtmlSlotElement",
"HtmlSourceElement",
"HtmlSpanElement",
"HtmlTableCaptionElement",
"HtmlTableCellElement",
"HtmlTableColElement",
"HtmlTableElement",
"HtmlTableRowElement",
"HtmlTableSectionElement",
"HtmlTemplateElement",
"HtmlTimeElement",
"HtmlTextAreaElement",
"HtmlTrackElement",
"HtmlUListElement",
"HtmlVideoElement",
]

[features]
Expand Down
Loading