mirror of
https://github.com/servo/servo.git
synced 2025-06-04 07:35:36 +00:00
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:
parent
6622b91f79
commit
c0bee7cb86
19 changed files with 139 additions and 124 deletions
7
.vscode/extensions.json
vendored
7
.vscode/extensions.json
vendored
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
||||||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
||||||
|
|
||||||
// List of extensions which should be recommended for users of this workspace.
|
// List of extensions which should be recommended for users of this workspace.
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
// Trim only touched lines.
|
// Trim only touched lines.
|
||||||
|
@ -15,6 +14,8 @@
|
||||||
// CSS support for HTML documents.
|
// CSS support for HTML documents.
|
||||||
"ecmel.vscode-html-css",
|
"ecmel.vscode-html-css",
|
||||||
// IDL language support
|
// IDL language support
|
||||||
"mythmon.idl"
|
"mythmon.idl",
|
||||||
|
// TOML files
|
||||||
|
"tamasfe.even-better-toml"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -22,7 +22,7 @@ byteorder = "1.0"
|
||||||
encoding_rs = "0.8"
|
encoding_rs = "0.8"
|
||||||
euclid = "0.22"
|
euclid = "0.22"
|
||||||
cookie = "0.12"
|
cookie = "0.12"
|
||||||
content-security-policy = { version = "0.5", features = ["serde"]}
|
content-security-policy = { version = "0.5", features = ["serde"] }
|
||||||
crossbeam-channel = "0.5"
|
crossbeam-channel = "0.5"
|
||||||
cssparser = "0.29"
|
cssparser = "0.29"
|
||||||
darling = { version = "0.13", default-features = false }
|
darling = { version = "0.13", default-features = false }
|
||||||
|
|
|
@ -37,7 +37,7 @@ profile_traits = { path = "../profile_traits" }
|
||||||
script_traits = { path = "../script_traits" }
|
script_traits = { path = "../script_traits" }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
servo_config = { path = "../config" }
|
servo_config = { path = "../config" }
|
||||||
servo_rand = {path = "../rand" }
|
servo_rand = { path = "../rand" }
|
||||||
servo_remutex = { path = "../remutex" }
|
servo_remutex = { path = "../remutex" }
|
||||||
servo_url = { path = "../url" }
|
servo_url = { path = "../url" }
|
||||||
style_traits = { path = "../style_traits" }
|
style_traits = { path = "../style_traits" }
|
||||||
|
|
|
@ -52,4 +52,3 @@ unicode-bidi = { workspace = true, features = ["with_serde"] }
|
||||||
unicode-script = { workspace = true }
|
unicode-script = { workspace = true }
|
||||||
webrender_api = { workspace = true }
|
webrender_api = { workspace = true }
|
||||||
xi-unicode = { workspace = true }
|
xi-unicode = { workspace = true }
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ authors = ["The Servo Project Developers"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
autotests = false # Inhibit lookup for tests/*.rs without [[test]] sections
|
autotests = false # Inhibit lookup for tests/*.rs without [[test]] sections
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "net"
|
name = "net"
|
||||||
|
@ -27,7 +27,7 @@ devtools_traits = { path = "../devtools_traits" }
|
||||||
embedder_traits = { path = "../embedder_traits" }
|
embedder_traits = { path = "../embedder_traits" }
|
||||||
flate2 = "1"
|
flate2 = "1"
|
||||||
futures = { version = "0.3", package = "futures" }
|
futures = { version = "0.3", package = "futures" }
|
||||||
futures-util = { version = "0.3" }
|
futures-util = { version = "0.3" }
|
||||||
generic-array = "0.14"
|
generic-array = "0.14"
|
||||||
headers = { workspace = true }
|
headers = { workspace = true }
|
||||||
http = { workspace = true }
|
http = { workspace = true }
|
||||||
|
@ -69,7 +69,7 @@ webrender_api = { workspace = true }
|
||||||
webpki-roots = { workspace = true }
|
webpki-roots = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
futures = {version = "0.3", features = ["compat"]}
|
futures = { version = "0.3", features = ["compat"] }
|
||||||
std_test_override = { path = "../std_test_override" }
|
std_test_override = { path = "../std_test_override" }
|
||||||
tokio-test = "0.4"
|
tokio-test = "0.4"
|
||||||
tokio-stream = { version = "0.1", features = ["net"] }
|
tokio-stream = { version = "0.1", features = ["net"] }
|
||||||
|
|
|
@ -15,4 +15,4 @@ unrooted_must_root_lint = []
|
||||||
trace_in_no_trace_lint = []
|
trace_in_no_trace_lint = []
|
||||||
|
|
||||||
[package.metadata.rust-analyzer]
|
[package.metadata.rust-analyzer]
|
||||||
rustc_private=true
|
rustc_private = true
|
||||||
|
|
|
@ -17,7 +17,7 @@ path = "lib.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
bench = []
|
bench = []
|
||||||
shmem = [ "dep:to_shmem", "dep:to_shmem_derive" ]
|
shmem = ["dep:to_shmem", "dep:to_shmem_derive"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = "1.0"
|
bitflags = "1.0"
|
||||||
|
|
|
@ -18,10 +18,20 @@ doctest = false
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
gecko = ["style_traits/gecko", "bindgen", "regex", "toml", "num_cpus", "mozbuild"]
|
gecko = ["style_traits/gecko", "bindgen", "regex", "toml", "num_cpus", "mozbuild"]
|
||||||
servo = ["serde", "style_traits/servo", "servo_atoms", "servo_config", "html5ever",
|
servo = [
|
||||||
"cssparser/serde", "encoding_rs", "malloc_size_of/servo", "servo_url",
|
"serde",
|
||||||
"string_cache", "to_shmem/servo",
|
"style_traits/servo",
|
||||||
"servo_arc/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_debug = []
|
||||||
gecko_refcount_logging = []
|
gecko_refcount_logging = []
|
||||||
|
|
||||||
|
@ -54,7 +64,7 @@ owning_ref = "0.4"
|
||||||
parking_lot = "0.11"
|
parking_lot = "0.11"
|
||||||
precomputed-hash = "0.1.1"
|
precomputed-hash = "0.1.1"
|
||||||
rayon = "1"
|
rayon = "1"
|
||||||
selectors = { path = "../selectors", features = ["shmem"] }
|
selectors = { path = "../selectors", features = ["shmem"] }
|
||||||
serde = { version = "1.0", optional = true, features = ["derive"] }
|
serde = { version = "1.0", optional = true, features = ["derive"] }
|
||||||
servo_arc = { path = "../servo_arc" }
|
servo_arc = { path = "../servo_arc" }
|
||||||
servo_atoms = { path = "../atoms", optional = true }
|
servo_atoms = { path = "../atoms", optional = true }
|
||||||
|
@ -78,7 +88,7 @@ void = "1.0.2"
|
||||||
bindgen = { version = "0.62", optional = true, default-features = false }
|
bindgen = { version = "0.62", optional = true, default-features = false }
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
mozbuild = {version = "0.1", optional = true}
|
mozbuild = { version = "0.1", optional = true }
|
||||||
regex = { version = "1.1", optional = true }
|
regex = { version = "1.1", optional = true }
|
||||||
toml = { version = "0.5", optional = true, default-features = false }
|
toml = { version = "0.5", optional = true, default-features = false }
|
||||||
walkdir = "2.1.4"
|
walkdir = "2.1.4"
|
||||||
|
|
|
@ -13,4 +13,3 @@ path = "lib.rs"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
euclid = { workspace = true }
|
euclid = { workspace = true }
|
||||||
surfman = { workspace = true }
|
surfman = { workspace = true }
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,3 @@ path = "lib.rs"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
euclid = { workspace = true }
|
euclid = { workspace = true }
|
||||||
webrender_api = { workspace = true }
|
webrender_api = { workspace = true }
|
||||||
|
|
||||||
|
|
|
@ -34,4 +34,3 @@ webxr = { git = "https://github.com/servo/webxr", features = ["glwindow"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
gst-plugin-version-helper = "0.2"
|
gst-plugin-version-helper = "0.2"
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ libservo = { path = "../../../components/servo" }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
servo-media = { git = "https://github.com/servo/media" }
|
servo-media = { git = "https://github.com/servo/media" }
|
||||||
surfman = { workspace = true, features = ["sm-angle-default"] }
|
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"] }
|
webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
|
||||||
|
|
||||||
[target.'cfg(not(target_os = "macos"))'.dependencies]
|
[target.'cfg(not(target_os = "macos"))'.dependencies]
|
||||||
|
@ -31,7 +31,7 @@ libloading = "0.5"
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
gl_generator = "0.14"
|
gl_generator = "0.14"
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
vergen = { version = "8.0.0", features = [ "git", "gitcl" ]}
|
vergen = { version = "8.0.0", features = ["git", "gitcl"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
debugmozjs = ["libservo/debugmozjs"]
|
debugmozjs = ["libservo/debugmozjs"]
|
||||||
|
|
|
@ -6,4 +6,3 @@ documentation_style = "c99"
|
||||||
|
|
||||||
[export]
|
[export]
|
||||||
exclude = ["OutputDebugStringA"]
|
exclude = ["OutputDebugStringA"]
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ path = "main.rs"
|
||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
vergen = { version = "8.0.0", features = [ "git", "gitcl" ]}
|
vergen = { version = "8.0.0", features = ["git", "gitcl"] }
|
||||||
|
|
||||||
[target.'cfg(windows)'.build-dependencies]
|
[target.'cfg(windows)'.build-dependencies]
|
||||||
winres = "0.1"
|
winres = "0.1"
|
||||||
|
|
|
@ -8,4 +8,4 @@ publish = false
|
||||||
test-package = { version = "*" }
|
test-package = { version = "*" }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
path = "lib.rs"
|
path = "lib.rs"
|
||||||
|
|
|
@ -12,8 +12,8 @@ wrong-key = true
|
||||||
|
|
||||||
[ignore]
|
[ignore]
|
||||||
files = [
|
files = [
|
||||||
"./fake/file.html",
|
"./fake/file.html",
|
||||||
]
|
]
|
||||||
directories = [
|
directories = [
|
||||||
"./fake/dir",
|
"./fake/dir",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
match_block_trailing_comma = true
|
match_block_trailing_comma = true
|
||||||
binop_separator = "Back"
|
binop_separator = "Back"
|
||||||
reorder_imports = true
|
reorder_imports = true
|
||||||
ignore = [ "third_party" ]
|
ignore = ["third_party"]
|
||||||
|
|
192
servo-tidy.toml
192
servo-tidy.toml
|
@ -10,123 +10,123 @@ check-ordered-json-keys = ["./resources/prefs.json"]
|
||||||
[blocked-packages]
|
[blocked-packages]
|
||||||
num = []
|
num = []
|
||||||
rand = [
|
rand = [
|
||||||
"ipc-channel",
|
"ipc-channel",
|
||||||
"phf_generator",
|
"phf_generator",
|
||||||
"quickcheck", # Only used in tests
|
"quickcheck", # Only used in tests
|
||||||
"servo_rand",
|
"servo_rand",
|
||||||
"tungstenite",
|
"tungstenite",
|
||||||
"ws",
|
"ws",
|
||||||
]
|
]
|
||||||
|
|
||||||
[ignore]
|
[ignore]
|
||||||
# Ignored packages with duplicated versions
|
# Ignored packages with duplicated versions
|
||||||
packages = [
|
packages = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"base64",
|
"base64",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"cookie",
|
"cookie",
|
||||||
"fixedbitset",
|
"fixedbitset",
|
||||||
"getrandom",
|
"getrandom",
|
||||||
"image",
|
"image",
|
||||||
"itoa",
|
"itoa",
|
||||||
"libloading",
|
"libloading",
|
||||||
"metal",
|
"metal",
|
||||||
"miniz_oxide",
|
"miniz_oxide",
|
||||||
"num-rational",
|
"num-rational",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"parking_lot_core",
|
"parking_lot_core",
|
||||||
"petgraph",
|
"petgraph",
|
||||||
"png",
|
"png",
|
||||||
"rand",
|
"rand",
|
||||||
"rand_chacha",
|
"rand_chacha",
|
||||||
"rand_core",
|
"rand_core",
|
||||||
"redox_syscall",
|
"redox_syscall",
|
||||||
"ron",
|
"ron",
|
||||||
"time",
|
"time",
|
||||||
"wasi",
|
"wasi",
|
||||||
"wayland-sys",
|
"wayland-sys",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
|
|
||||||
# Duplicated by rustls and image.
|
# Duplicated by rustls and image.
|
||||||
"spin",
|
"spin",
|
||||||
|
|
||||||
# Duplicated by rustls and the version of webpki-roots required by async_tungstenite.
|
# Duplicated by rustls and the version of webpki-roots required by async_tungstenite.
|
||||||
"rustls-webpki",
|
"rustls-webpki",
|
||||||
|
|
||||||
# https://github.com/servo/servo/issues/26933
|
# https://github.com/servo/servo/issues/26933
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures",
|
"futures",
|
||||||
"mio",
|
"mio",
|
||||||
|
|
||||||
# https://github.com/servo/servo/pull/23288#issuecomment-494687746
|
# https://github.com/servo/servo/pull/23288#issuecomment-494687746
|
||||||
"gl_generator",
|
"gl_generator",
|
||||||
|
|
||||||
# https://github.com/servo/servo/pull/25518
|
# https://github.com/servo/servo/pull/25518
|
||||||
"core-foundation",
|
"core-foundation",
|
||||||
"core-foundation-sys",
|
"core-foundation-sys",
|
||||||
"lyon_geom",
|
"lyon_geom",
|
||||||
|
|
||||||
# https://github.com/servo/servo/pull/28236
|
# https://github.com/servo/servo/pull/28236
|
||||||
"nix",
|
"nix",
|
||||||
|
|
||||||
# Duplicated by webrender debugger via ws
|
# Duplicated by webrender debugger via ws
|
||||||
"block-buffer",
|
"block-buffer",
|
||||||
"digest",
|
"digest",
|
||||||
"generic-array",
|
"generic-array",
|
||||||
|
|
||||||
# Duplicated by winit/surfman update.
|
# Duplicated by winit/surfman update.
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
|
|
||||||
# Temporarily duplicated until gleam can be upgrded.
|
# Temporarily duplicated until gleam can be upgrded.
|
||||||
"uuid",
|
"uuid",
|
||||||
|
|
||||||
# winit port minibrowser (servo/servo#30049)
|
# winit port minibrowser (servo/servo#30049)
|
||||||
"clipboard-win",
|
"clipboard-win",
|
||||||
]
|
]
|
||||||
# Files that are ignored for all tidy and lint checks.
|
# Files that are ignored for all tidy and lint checks.
|
||||||
files = [
|
files = [
|
||||||
"./components/net/tests/parsable_mime/text",
|
"./components/net/tests/parsable_mime/text",
|
||||||
# Ignore style files to avoid diverging too much from upstream Gecko
|
# Ignore style files to avoid diverging too much from upstream Gecko
|
||||||
"./components/style/",
|
"./components/style/",
|
||||||
"./components/style_derive/parse.rs",
|
"./components/style_derive/parse.rs",
|
||||||
"./resources/hsts_preload.json",
|
"./resources/hsts_preload.json",
|
||||||
"./tests/wpt/meta/MANIFEST.json",
|
"./tests/wpt/meta/MANIFEST.json",
|
||||||
"./tests/wpt/meta-legacy-layout/MANIFEST.json",
|
"./tests/wpt/meta-legacy-layout/MANIFEST.json",
|
||||||
"./tests/wpt/mozilla/meta/MANIFEST.json",
|
"./tests/wpt/mozilla/meta/MANIFEST.json",
|
||||||
"./tests/wpt/mozilla/meta-legacy-layout/MANIFEST.json",
|
"./tests/wpt/mozilla/meta-legacy-layout/MANIFEST.json",
|
||||||
# Long encoded string
|
# Long encoded string
|
||||||
"./tests/wpt/mozilla/tests/mozilla/resources/brotli.py",
|
"./tests/wpt/mozilla/tests/mozilla/resources/brotli.py",
|
||||||
"./tests/wpt/webgl/meta/MANIFEST.json",
|
"./tests/wpt/webgl/meta/MANIFEST.json",
|
||||||
# Upstream code from Khronos/WebGL uses tabs for indentation
|
# Upstream code from Khronos/WebGL uses tabs for indentation
|
||||||
"./tests/wpt/webgl/tests",
|
"./tests/wpt/webgl/tests",
|
||||||
# Vendored from upstream
|
# Vendored from upstream
|
||||||
"./tests/wpt/webgpu/tests",
|
"./tests/wpt/webgpu/tests",
|
||||||
# Our import script is not currently respecting the lint.
|
# Our import script is not currently respecting the lint.
|
||||||
"./tests/wpt/webgl/tools/import-conformance-tests.py",
|
"./tests/wpt/webgl/tools/import-conformance-tests.py",
|
||||||
# Ignore those files since the issues reported are on purpose
|
# Ignore those files since the issues reported are on purpose
|
||||||
"./tests/html/bad-line-ends.html",
|
"./tests/html/bad-line-ends.html",
|
||||||
"./tests/wpt/mozilla/tests/css/fonts",
|
"./tests/wpt/mozilla/tests/css/fonts",
|
||||||
"./tests/wpt/mozilla/tests/css/pre_with_tab.html",
|
"./tests/wpt/mozilla/tests/css/pre_with_tab.html",
|
||||||
"./tests/wpt/mozilla/tests/mozilla/textarea_placeholder.html",
|
"./tests/wpt/mozilla/tests/mozilla/textarea_placeholder.html",
|
||||||
# Python 3 syntax causes "E901 SyntaxError" when flake8 runs in Python 2
|
# Python 3 syntax causes "E901 SyntaxError" when flake8 runs in Python 2
|
||||||
"./components/style/properties/build.py",
|
"./components/style/properties/build.py",
|
||||||
# The tidy tests currently don't pass tidy.
|
# The tidy tests currently don't pass tidy.
|
||||||
"./python/tidy/test.py",
|
"./python/tidy/test.py",
|
||||||
]
|
]
|
||||||
# Directories that are ignored for the non-WPT tidy check.
|
# Directories that are ignored for the non-WPT tidy check.
|
||||||
directories = [
|
directories = [
|
||||||
# Upstream
|
# Upstream
|
||||||
"./support/android/apk",
|
"./support/android/apk",
|
||||||
"./tests/wpt/harness",
|
"./tests/wpt/harness",
|
||||||
"./tests/wpt/tests",
|
"./tests/wpt/tests",
|
||||||
"./tests/wpt/mozilla/tests/mozilla/referrer-policy",
|
"./tests/wpt/mozilla/tests/mozilla/referrer-policy",
|
||||||
"./tests/wpt/mozilla/tests/webgl",
|
"./tests/wpt/mozilla/tests/webgl",
|
||||||
"./python/tidy/tests",
|
"./python/tidy/tests",
|
||||||
"./python/_virtualenv*",
|
"./python/_virtualenv*",
|
||||||
"./python/mach",
|
"./python/mach",
|
||||||
# Generated and upstream code combined with our own. Could use cleanup
|
# Generated and upstream code combined with our own. Could use cleanup
|
||||||
"./target",
|
"./target",
|
||||||
"./third_party",
|
"./third_party",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Directories that are checked for correct file extension
|
# Directories that are checked for correct file extension
|
||||||
|
|
9
taplo.toml
Normal file
9
taplo.toml
Normal 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 = " "
|
Loading…
Add table
Add a link
Reference in a new issue