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

style: reformat all TOML files with taplo #3942

Merged
merged 3 commits into from
Jul 13, 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
1 change: 0 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[alias]
dev-install = "run -- --no-modify-path -y"

12 changes: 10 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ jobs:
- name: Run CI workflow generation checks
run: |
./ci/actions-templates/gen-workflows.sh
git diff --quiet
git diff --exit-code
- name: Prep cargo dirs
run: |
mkdir -p ~/.cargo/{registry,git}
Expand Down Expand Up @@ -1392,7 +1392,15 @@ jobs:
shellcheck -x -s dash -- rustup-init.sh
git ls-files -- '*.sh' | xargs shellcheck -x -s dash
git ls-files -- '*.bash' | xargs shellcheck -x -s bash
- name: Run formatting checks
- name: Install taplo
uses: taiki-e/install-action@v2
with:
tool: taplo-cli@0.8
rami3l marked this conversation as resolved.
Show resolved Hide resolved
- name: Run TOML formatting checks
run: |
taplo fmt
git diff --exit-code
- name: Run Rust formatting checks
run: |
cargo fmt --all --check
- name: Run cargo check and clippy
Expand Down
13 changes: 13 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include = ["**/*.toml"]

[[rule]]
include = ["**/Cargo.toml"]
keys = [
"dependencies",
"dev-dependencies",
"build-dependencies",
"workspace.dependencies",
]

[rule.formatting]
column_width = 160
50 changes: 25 additions & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ build = "build.rs"
[features]
curl-backend = ["download/curl-backend"]
default = [
"curl-backend",
"reqwest-backend",
"reqwest-native-tls",
"reqwest-rustls-tls",
"curl-backend",
"reqwest-backend",
"reqwest-native-tls",
"reqwest-rustls-tls",
]

reqwest-backend = ["download/reqwest-backend"]
Expand All @@ -30,10 +30,10 @@ no-self-update = []

# Include an Opentelemetry sink for tracing events
otel = [
"dep:opentelemetry-otlp",
"dep:tracing-opentelemetry",
"dep:opentelemetry",
"dep:opentelemetry_sdk",
"dep:opentelemetry-otlp",
"dep:tracing-opentelemetry",
"dep:opentelemetry",
"dep:opentelemetry_sdk",
]

# Exports code dependent on private interfaces for the integration test suite
Expand Down Expand Up @@ -61,8 +61,8 @@ opener = "0.7.0"
# allows controlling the vendoring status without exposing the presence of the download crate.
openssl = { version = "0.10", optional = true }
opentelemetry = { workspace = true, optional = true }
opentelemetry_sdk = { workspace = true, optional = true }
opentelemetry-otlp = { workspace = true, optional = true }
opentelemetry_sdk = { workspace = true, optional = true }
pulldown-cmark = { version = "0.11", default-features = false }
rand = "0.8"
regex = "1"
Expand All @@ -81,13 +81,13 @@ tempfile.workspace = true
termcolor.workspace = true
thiserror.workspace = true
threadpool = "1"
tokio-retry.workspace = true
tokio.workspace = true
tokio-retry.workspace = true
tokio-stream.workspace = true
toml = "0.8"
tracing.workspace = true
tracing-opentelemetry = { workspace = true, optional = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
tracing.workspace = true
url.workspace = true
wait-timeout = "0.2"
walkdir = { workspace = true, optional = true }
Expand All @@ -100,19 +100,19 @@ winreg = "0.52"

[target."cfg(windows)".dependencies.windows-sys]
features = [
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_Diagnostics_ToolHelp",
"Win32_System_IO",
"Win32_System_Ioctl",
"Win32_System_JobObjects",
"Win32_System_Kernel",
"Win32_System_LibraryLoader",
"Win32_System_SystemInformation",
"Win32_System_SystemServices",
"Win32_System_Threading",
"Win32_System_WindowsProgramming",
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_Diagnostics_ToolHelp",
"Win32_System_IO",
"Win32_System_Ioctl",
"Win32_System_JobObjects",
"Win32_System_Kernel",
"Win32_System_LibraryLoader",
"Win32_System_SystemInformation",
"Win32_System_SystemServices",
"Win32_System_Threading",
"Win32_System_WindowsProgramming",
]
version = "0.52.0"

Expand All @@ -136,8 +136,8 @@ anyhow = "1.0.69"
fs_at = "0.1.6"
once_cell = "1.18.0"
opentelemetry = "0.23"
opentelemetry_sdk = { version = "0.23", features = ["rt-tokio"] }
opentelemetry-otlp = "0.16"
opentelemetry_sdk = { version = "0.23", features = ["rt-tokio"] }
platforms = "3.4"
proptest = "1.1.0"
tempfile = "3.8"
Expand Down
12 changes: 10 additions & 2 deletions ci/actions-templates/centos-fmt-clippy-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs: # skip-all
- name: Run CI workflow generation checks
run: |
./ci/actions-templates/gen-workflows.sh
git diff --quiet
git diff --exit-code
- name: Prep cargo dirs
run: |
mkdir -p ~/.cargo/{registry,git}
Expand Down Expand Up @@ -65,7 +65,15 @@ jobs: # skip-all
shellcheck -x -s dash -- rustup-init.sh
git ls-files -- '*.sh' | xargs shellcheck -x -s dash
git ls-files -- '*.bash' | xargs shellcheck -x -s bash
- name: Run formatting checks
- name: Install taplo
uses: taiki-e/install-action@v2
with:
tool: taplo-cli@0.8
- name: Run TOML formatting checks
run: |
taplo fmt
git diff --exit-code
- name: Run Rust formatting checks
run: |
cargo fmt --all --check
- name: Run cargo check and clippy
Expand Down
105 changes: 52 additions & 53 deletions src/dist/manifest/tests/channel-rust-nightly-example.toml
Original file line number Diff line number Diff line change
@@ -1,60 +1,59 @@
manifest-version = "2"
date = "2015-10-10"
[pkg.rust]
version = "rustc 1.3.0 (9a92aaf19 2015-09-15)"
[pkg.rust.target.x86_64-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
[[pkg.rust.target.x86_64-unknown-linux-gnu.components]]
pkg = "rustc"
target = "x86_64-unknown-linux-gnu"
[[pkg.rust.target.x86_64-unknown-linux-gnu.components]]
pkg = "rust-docs"
target = "x86_64-unknown-linux-gnu"
[[pkg.rust.target.x86_64-unknown-linux-gnu.components]]
pkg = "cargo"
target = "x86_64-unknown-linux-gnu"
[[pkg.rust.target.x86_64-unknown-linux-gnu.components]]
pkg = "rust-std"
target = "x86_64-unknown-linux-gnu"
# extensions are rust-std or rust-docs that aren't in the rust tarball's component list
[[pkg.rust.target.x86_64-unknown-linux-gnu.extensions]]
pkg = "rust-std"
target = "x86_64-unknown-linux-musl"
[[pkg.rust.target.x86_64-unknown-linux-gnu.extensions]]
pkg = "rust-std"
target = "i686-unknown-linux-gnu"
version = "rustc 1.3.0 (9a92aaf19 2015-09-15)"
[pkg.rust.target.x86_64-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
[[pkg.rust.target.x86_64-unknown-linux-gnu.components]]
pkg = "rustc"
target = "x86_64-unknown-linux-gnu"
[[pkg.rust.target.x86_64-unknown-linux-gnu.components]]
pkg = "rust-docs"
target = "x86_64-unknown-linux-gnu"
[[pkg.rust.target.x86_64-unknown-linux-gnu.components]]
pkg = "cargo"
target = "x86_64-unknown-linux-gnu"
[[pkg.rust.target.x86_64-unknown-linux-gnu.components]]
pkg = "rust-std"
target = "x86_64-unknown-linux-gnu"
# extensions are rust-std or rust-docs that aren't in the rust tarball's component list
[[pkg.rust.target.x86_64-unknown-linux-gnu.extensions]]
pkg = "rust-std"
target = "x86_64-unknown-linux-musl"
[[pkg.rust.target.x86_64-unknown-linux-gnu.extensions]]
pkg = "rust-std"
target = "i686-unknown-linux-gnu"
[pkg.rustc]
version = "rustc 1.3.0 (9a92aaf19 2015-09-15)"
[pkg.rustc.target.x86_64-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
version = "rustc 1.3.0 (9a92aaf19 2015-09-15)"
[pkg.rustc.target.x86_64-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
[pkg.cargo]
version = "cargo 0.4.0-nightly (553b363 2015-08-03)"
[pkg.cargo.target.x86_64-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
version = "cargo 0.4.0-nightly (553b363 2015-08-03)"
[pkg.cargo.target.x86_64-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
[pkg.rust-std]
version = "rustc 1.3.0 (9a92aaf19 2015-09-15)"
[pkg.rust-std.target.x86_64-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
[pkg.rust-std.target.x86_64-unknown-linux-musl]
available = true
url = "example.com"
hash = "..."
[pkg.rust-std.target.i686-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
version = "rustc 1.3.0 (9a92aaf19 2015-09-15)"
[pkg.rust-std.target.x86_64-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
[pkg.rust-std.target.x86_64-unknown-linux-musl]
available = true
url = "example.com"
hash = "..."
[pkg.rust-std.target.i686-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
[pkg.rust-docs]
version = "rustc 1.3.0 (9a92aaf19 2015-09-15)"
[pkg.rust-docs.target.x86_64-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."

version = "rustc 1.3.0 (9a92aaf19 2015-09-15)"
[pkg.rust-docs.target.x86_64-unknown-linux-gnu]
available = true
url = "example.com"
hash = "..."
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["check","--help"]
args = ["check", "--help"]
stdout = """
...
Check for updates to Rust toolchains and rustup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["override","--help"]
args = ["override", "--help"]
stdout = """
...
Modify toolchain overrides for directories
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["override","list","--help"]
args = ["override", "list", "--help"]
stdout = """
...
List directory toolchain overrides
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["self","update","--help"]
args = ["self", "update", "--help"]
stdout = """
...
Download and install updates to rustup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["set","--help"]
args = ["set", "--help"]
stdout = """
...
Alter rustup settings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["show","active-toolchain","--help"]
args = ["show", "active-toolchain", "--help"]
stdout = """
...
Show the active toolchain
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["show","--help"]
args = ["show", "--help"]
stdout = """
...
Show the active and installed toolchains or profiles
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["show","home","--help"]
args = ["show", "home", "--help"]
stdout = """
...
Display the computed value of RUSTUP_HOME
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["show","profile","--help"]
args = ["show", "profile", "--help"]
stdout = """
...
Show the default profile used for the `rustup install` command
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["target","--help"]
args = ["target", "--help"]
stdout = """
...
Modify a toolchain's supported targets
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["toolchain","--help"]
args = ["toolchain", "--help"]
stdout = """
...
Modify or query the installed toolchains
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["toolchain","list","--help"]
args = ["toolchain", "list", "--help"]
stdout = """
...
List installed toolchains
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["toolchain","uninstall","--help"]
args = ["toolchain", "uninstall", "--help"]
stdout = """
...
Uninstall a toolchain
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["up","--help"]
args = ["up", "--help"]
stdout = """
...
Update Rust toolchains and rustup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["update","--help"]
args = ["update", "--help"]
stdout = """
...
Update Rust toolchains and rustup
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bin.name = "rustup"
args = ["upgrade","--help"]
args = ["upgrade", "--help"]
stdout = """
...
Update Rust toolchains and rustup
Expand Down
Loading
Loading