Format toml files (#30112)

* Add taplo fmt config for toml fmt

* fmt toml files

* Add even-better-toml to extensions recommendations
This commit is contained in:
Samson 2023-08-17 17:07:43 +02:00 committed by GitHub
parent 6622b91f79
commit c0bee7cb86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 139 additions and 124 deletions

View file

@ -1,7 +1,6 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
// Trim only touched lines.
@ -15,6 +14,8 @@
// CSS support for HTML documents.
"ecmel.vscode-html-css",
// IDL language support
"mythmon.idl"
"mythmon.idl",
// TOML files
"tamasfe.even-better-toml"
]
}
}

View file

@ -22,7 +22,7 @@ byteorder = "1.0"
encoding_rs = "0.8"
euclid = "0.22"
cookie = "0.12"
content-security-policy = { version = "0.5", features = ["serde"]}
content-security-policy = { version = "0.5", features = ["serde"] }
crossbeam-channel = "0.5"
cssparser = "0.29"
darling = { version = "0.13", default-features = false }

View file

@ -37,7 +37,7 @@ profile_traits = { path = "../profile_traits" }
script_traits = { path = "../script_traits" }
serde = { workspace = true }
servo_config = { path = "../config" }
servo_rand = {path = "../rand" }
servo_rand = { path = "../rand" }
servo_remutex = { path = "../remutex" }
servo_url = { path = "../url" }
style_traits = { path = "../style_traits" }

View file

@ -52,4 +52,3 @@ unicode-bidi = { workspace = true, features = ["with_serde"] }
unicode-script = { workspace = true }
webrender_api = { workspace = true }
xi-unicode = { workspace = true }

View file

@ -5,7 +5,7 @@ authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false
autotests = false # Inhibit lookup for tests/*.rs without [[test]] sections
autotests = false # Inhibit lookup for tests/*.rs without [[test]] sections
[lib]
name = "net"
@ -27,7 +27,7 @@ devtools_traits = { path = "../devtools_traits" }
embedder_traits = { path = "../embedder_traits" }
flate2 = "1"
futures = { version = "0.3", package = "futures" }
futures-util = { version = "0.3" }
futures-util = { version = "0.3" }
generic-array = "0.14"
headers = { workspace = true }
http = { workspace = true }
@ -69,7 +69,7 @@ webrender_api = { workspace = true }
webpki-roots = { workspace = true }
[dev-dependencies]
futures = {version = "0.3", features = ["compat"]}
futures = { version = "0.3", features = ["compat"] }
std_test_override = { path = "../std_test_override" }
tokio-test = "0.4"
tokio-stream = { version = "0.1", features = ["net"] }

View file

@ -15,4 +15,4 @@ unrooted_must_root_lint = []
trace_in_no_trace_lint = []
[package.metadata.rust-analyzer]
rustc_private=true
rustc_private = true

View file

@ -17,7 +17,7 @@ path = "lib.rs"
[features]
bench = []
shmem = [ "dep:to_shmem", "dep:to_shmem_derive" ]
shmem = ["dep:to_shmem", "dep:to_shmem_derive"]
[dependencies]
bitflags = "1.0"

View file

@ -18,10 +18,20 @@ doctest = false
[features]
gecko = ["style_traits/gecko", "bindgen", "regex", "toml", "num_cpus", "mozbuild"]
servo = ["serde", "style_traits/servo", "servo_atoms", "servo_config", "html5ever",
"cssparser/serde", "encoding_rs", "malloc_size_of/servo", "servo_url",
"string_cache", "to_shmem/servo",
"servo_arc/servo"]
servo = [
"serde",
"style_traits/servo",
"servo_atoms",
"servo_config",
"html5ever",
"cssparser/serde",
"encoding_rs",
"malloc_size_of/servo",
"servo_url",
"string_cache",
"to_shmem/servo",
"servo_arc/servo",
]
gecko_debug = []
gecko_refcount_logging = []
@ -54,7 +64,7 @@ owning_ref = "0.4"
parking_lot = "0.11"
precomputed-hash = "0.1.1"
rayon = "1"
selectors = { path = "../selectors", features = ["shmem"] }
selectors = { path = "../selectors", features = ["shmem"] }
serde = { version = "1.0", optional = true, features = ["derive"] }
servo_arc = { path = "../servo_arc" }
servo_atoms = { path = "../atoms", optional = true }
@ -78,7 +88,7 @@ void = "1.0.2"
bindgen = { version = "0.62", optional = true, default-features = false }
lazy_static = "1"
log = "0.4"
mozbuild = {version = "0.1", optional = true}
mozbuild = { version = "0.1", optional = true }
regex = { version = "1.1", optional = true }
toml = { version = "0.5", optional = true, default-features = false }
walkdir = "2.1.4"

View file

@ -13,4 +13,3 @@ path = "lib.rs"
[dependencies]
euclid = { workspace = true }
surfman = { workspace = true }

View file

@ -13,4 +13,3 @@ path = "lib.rs"
[dependencies]
euclid = { workspace = true }
webrender_api = { workspace = true }

View file

@ -34,4 +34,3 @@ webxr = { git = "https://github.com/servo/webxr", features = ["glwindow"] }
[build-dependencies]
gst-plugin-version-helper = "0.2"

View file

@ -13,7 +13,7 @@ libservo = { path = "../../../components/servo" }
log = { workspace = true }
servo-media = { git = "https://github.com/servo/media" }
surfman = { workspace = true, features = ["sm-angle-default"] }
webxr = { git = "https://github.com/servo/webxr"}
webxr = { git = "https://github.com/servo/webxr" }
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
[target.'cfg(not(target_os = "macos"))'.dependencies]
@ -31,7 +31,7 @@ libloading = "0.5"
[build-dependencies]
gl_generator = "0.14"
serde_json = { workspace = true }
vergen = { version = "8.0.0", features = [ "git", "gitcl" ]}
vergen = { version = "8.0.0", features = ["git", "gitcl"] }
[features]
debugmozjs = ["libservo/debugmozjs"]

View file

@ -6,4 +6,3 @@ documentation_style = "c99"
[export]
exclude = ["OutputDebugStringA"]

View file

@ -14,7 +14,7 @@ path = "main.rs"
bench = false
[build-dependencies]
vergen = { version = "8.0.0", features = [ "git", "gitcl" ]}
vergen = { version = "8.0.0", features = ["git", "gitcl"] }
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"

View file

@ -8,4 +8,4 @@ publish = false
test-package = { version = "*" }
[lib]
path = "lib.rs"
path = "lib.rs"

View file

@ -12,8 +12,8 @@ wrong-key = true
[ignore]
files = [
"./fake/file.html",
"./fake/file.html",
]
directories = [
"./fake/dir",
"./fake/dir",
]

View file

@ -1,4 +1,4 @@
match_block_trailing_comma = true
binop_separator = "Back"
reorder_imports = true
ignore = [ "third_party" ]
ignore = ["third_party"]

View file

@ -10,123 +10,123 @@ check-ordered-json-keys = ["./resources/prefs.json"]
[blocked-packages]
num = []
rand = [
"ipc-channel",
"phf_generator",
"quickcheck", # Only used in tests
"servo_rand",
"tungstenite",
"ws",
"ipc-channel",
"phf_generator",
"quickcheck", # Only used in tests
"servo_rand",
"tungstenite",
"ws",
]
[ignore]
# Ignored packages with duplicated versions
packages = [
"arrayvec",
"base64",
"cfg-if",
"cookie",
"fixedbitset",
"getrandom",
"image",
"itoa",
"libloading",
"metal",
"miniz_oxide",
"num-rational",
"parking_lot",
"parking_lot_core",
"petgraph",
"png",
"rand",
"rand_chacha",
"rand_core",
"redox_syscall",
"ron",
"time",
"wasi",
"wayland-sys",
"bitflags",
"arrayvec",
"base64",
"cfg-if",
"cookie",
"fixedbitset",
"getrandom",
"image",
"itoa",
"libloading",
"metal",
"miniz_oxide",
"num-rational",
"parking_lot",
"parking_lot_core",
"petgraph",
"png",
"rand",
"rand_chacha",
"rand_core",
"redox_syscall",
"ron",
"time",
"wasi",
"wayland-sys",
"bitflags",
# Duplicated by rustls and image.
"spin",
# Duplicated by rustls and image.
"spin",
# Duplicated by rustls and the version of webpki-roots required by async_tungstenite.
"rustls-webpki",
# Duplicated by rustls and the version of webpki-roots required by async_tungstenite.
"rustls-webpki",
# https://github.com/servo/servo/issues/26933
"bytes",
"futures",
"mio",
# https://github.com/servo/servo/issues/26933
"bytes",
"futures",
"mio",
# https://github.com/servo/servo/pull/23288#issuecomment-494687746
"gl_generator",
# https://github.com/servo/servo/pull/23288#issuecomment-494687746
"gl_generator",
# https://github.com/servo/servo/pull/25518
"core-foundation",
"core-foundation-sys",
"lyon_geom",
# https://github.com/servo/servo/pull/25518
"core-foundation",
"core-foundation-sys",
"lyon_geom",
# https://github.com/servo/servo/pull/28236
"nix",
# https://github.com/servo/servo/pull/28236
"nix",
# Duplicated by webrender debugger via ws
"block-buffer",
"digest",
"generic-array",
# Duplicated by webrender debugger via ws
"block-buffer",
"digest",
"generic-array",
# Duplicated by winit/surfman update.
"raw-window-handle",
# Duplicated by winit/surfman update.
"raw-window-handle",
# Temporarily duplicated until gleam can be upgrded.
"uuid",
# Temporarily duplicated until gleam can be upgrded.
"uuid",
# winit port minibrowser (servo/servo#30049)
"clipboard-win",
# winit port minibrowser (servo/servo#30049)
"clipboard-win",
]
# Files that are ignored for all tidy and lint checks.
files = [
"./components/net/tests/parsable_mime/text",
# Ignore style files to avoid diverging too much from upstream Gecko
"./components/style/",
"./components/style_derive/parse.rs",
"./resources/hsts_preload.json",
"./tests/wpt/meta/MANIFEST.json",
"./tests/wpt/meta-legacy-layout/MANIFEST.json",
"./tests/wpt/mozilla/meta/MANIFEST.json",
"./tests/wpt/mozilla/meta-legacy-layout/MANIFEST.json",
# Long encoded string
"./tests/wpt/mozilla/tests/mozilla/resources/brotli.py",
"./tests/wpt/webgl/meta/MANIFEST.json",
# Upstream code from Khronos/WebGL uses tabs for indentation
"./tests/wpt/webgl/tests",
# Vendored from upstream
"./tests/wpt/webgpu/tests",
# Our import script is not currently respecting the lint.
"./tests/wpt/webgl/tools/import-conformance-tests.py",
# Ignore those files since the issues reported are on purpose
"./tests/html/bad-line-ends.html",
"./tests/wpt/mozilla/tests/css/fonts",
"./tests/wpt/mozilla/tests/css/pre_with_tab.html",
"./tests/wpt/mozilla/tests/mozilla/textarea_placeholder.html",
# Python 3 syntax causes "E901 SyntaxError" when flake8 runs in Python 2
"./components/style/properties/build.py",
# The tidy tests currently don't pass tidy.
"./python/tidy/test.py",
"./components/net/tests/parsable_mime/text",
# Ignore style files to avoid diverging too much from upstream Gecko
"./components/style/",
"./components/style_derive/parse.rs",
"./resources/hsts_preload.json",
"./tests/wpt/meta/MANIFEST.json",
"./tests/wpt/meta-legacy-layout/MANIFEST.json",
"./tests/wpt/mozilla/meta/MANIFEST.json",
"./tests/wpt/mozilla/meta-legacy-layout/MANIFEST.json",
# Long encoded string
"./tests/wpt/mozilla/tests/mozilla/resources/brotli.py",
"./tests/wpt/webgl/meta/MANIFEST.json",
# Upstream code from Khronos/WebGL uses tabs for indentation
"./tests/wpt/webgl/tests",
# Vendored from upstream
"./tests/wpt/webgpu/tests",
# Our import script is not currently respecting the lint.
"./tests/wpt/webgl/tools/import-conformance-tests.py",
# Ignore those files since the issues reported are on purpose
"./tests/html/bad-line-ends.html",
"./tests/wpt/mozilla/tests/css/fonts",
"./tests/wpt/mozilla/tests/css/pre_with_tab.html",
"./tests/wpt/mozilla/tests/mozilla/textarea_placeholder.html",
# Python 3 syntax causes "E901 SyntaxError" when flake8 runs in Python 2
"./components/style/properties/build.py",
# The tidy tests currently don't pass tidy.
"./python/tidy/test.py",
]
# Directories that are ignored for the non-WPT tidy check.
directories = [
# Upstream
"./support/android/apk",
"./tests/wpt/harness",
"./tests/wpt/tests",
"./tests/wpt/mozilla/tests/mozilla/referrer-policy",
"./tests/wpt/mozilla/tests/webgl",
"./python/tidy/tests",
"./python/_virtualenv*",
"./python/mach",
# Generated and upstream code combined with our own. Could use cleanup
"./target",
"./third_party",
# Upstream
"./support/android/apk",
"./tests/wpt/harness",
"./tests/wpt/tests",
"./tests/wpt/mozilla/tests/mozilla/referrer-policy",
"./tests/wpt/mozilla/tests/webgl",
"./python/tidy/tests",
"./python/_virtualenv*",
"./python/mach",
# Generated and upstream code combined with our own. Could use cleanup
"./target",
"./third_party",
]
# Directories that are checked for correct file extension

9
taplo.toml Normal file
View file

@ -0,0 +1,9 @@
# upstream files we should not format
exclude = ["third_party/**", "tests/**"]
[formatting]
array_auto_collapse = false
array_auto_expand = false
align_comments = false
column_width = 120
indent_string = " "