Add taplo formatting (#462)
Some checks failed
/ Build - Windows x86 (push) Has been cancelled
/ Build - Windows x86_64 (push) Has been cancelled
/ Build - Linux x86 (push) Has been cancelled
/ Build - Android aarch64 (push) Has been cancelled
/ Build - Linux aarch64 (push) Has been cancelled
/ Build - Linux x86_64 (push) Has been cancelled
/ Build - MacOS aarch64 (push) Has been cancelled
/ Build - MacOS x86_64 (push) Has been cancelled
/ Build - Freebsd x86_64 (push) Has been cancelled
/ Build - Android armv7 (push) Has been cancelled
/ Build - Freebsd x86 (push) Has been cancelled
/ Build - Linux armv6 (push) Has been cancelled
/ Build - Linux armv7hf (push) Has been cancelled
/ Release (push) Has been cancelled

This commit is contained in:
Hitu
2025-08-25 23:26:20 -07:00
committed by GitHub
parent 97672e59aa
commit 218753ea9c
7 changed files with 24 additions and 13 deletions

View File

@@ -135,6 +135,9 @@ jobs:
- name: Install bindgen-cli
run: cargo install bindgen-cli
- name: Install taplo-cli
run: cargo install taplo-cli --locked
- name: Show command used for Cargo
run: |
echo "cargo command is: ${{ env.CARGO }}"

View File

@@ -1,10 +1,7 @@
[workspace]
resolver = "3"
members = [
"wstunnel",
"wstunnel-cli",
]
members = ["wstunnel", "wstunnel-cli"]
[workspace.dependencies]

View File

@@ -6,6 +6,7 @@ _default:
make_release $VERSION $FORCE="":
sed -i 's/^version = .*/version = "'$VERSION'"/g' wstunnel-cli/Cargo.toml wstunnel/Cargo.toml
cargo fmt --all -- --check --color=always || (echo "Use cargo fmt to format your code"; exit 1)
taplo fmt --check --colors always || (echo "Use taplo fmt to format your TOML files"; exit 1)
#cargo clippy --all --all-features -- -D warnings || (echo "Solve your clippy warnings to succeed"; exit 1)
git add wstunnel/Cargo.* wstunnel-cli/Cargo.* Cargo.*
git commit -m 'Bump version v'$VERSION
@@ -38,3 +39,7 @@ bump_deps:
linter_fix:
cargo clippy --fix --all-features --locked --allow-dirty
fmt:
cargo fmt --all
taplo fmt

View File

@@ -6,7 +6,6 @@ rust = "1.88"
description = "Run all the tests with features. Requires docker"
run = "cargo nextest run --all-features"
[tasks.bump-deps]
description = "Upgrade all libs versions for all packages"
run = """
@@ -14,7 +13,6 @@ run = """
cargo update --recursive
"""
[tasks.linter-fix]
description = "Fix linter issues when possible and format code"
run = """
@@ -41,7 +39,6 @@ run = """
docker buildx rm builder
"""
[tasks.publish-release]
description = "Push a new release of wstunnel"
usage = '''
@@ -63,4 +60,3 @@ git tag ${{FORCE}} v$usage_version -m 'version v'$usage_version
git push ${{FORCE}}
git push ${{FORCE}} origin v$usage_version
"""

2
taplo.toml Normal file
View File

@@ -0,0 +1,2 @@
[formatting]
column_width = 120

View File

@@ -10,9 +10,9 @@ fdlimit = "0.3.0"
tokio = { version = "1.46.1", features = ["full"] }
tracing = { version = "0.1.41", features = ["log"] }
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "fmt", "local-time"] }
wstunnel = { path = "../wstunnel" , default-features = false, features = ["clap"] }
wstunnel = { path = "../wstunnel", default-features = false, features = ["clap"] }
tikv-jemallocator = { version = "0.6", optional = true }
tikv-jemallocator = { version = "0.6", optional = true }
[features]
default = ["aws-lc-rs"]

View File

@@ -54,7 +54,11 @@ derive_more = { version = "2.0.1", features = ["display", "error"] }
tokio-rustls = { version = "0.26.2", default-features = false, features = ["logging", "tls12"] }
rcgen = { version = "0.14.2", default-features = false, features = [] }
hickory-resolver = { version = "0.25.2", default-features = false, features = ["system-config", "tokio", "rustls-platform-verifier"] }
hickory-resolver = { version = "0.25.2", default-features = false, features = [
"system-config",
"tokio",
"rustls-platform-verifier",
] }
aws-lc-rs = { version = "*", optional = true }
[target.'cfg(not(target_family = "unix"))'.dependencies]
@@ -76,7 +80,11 @@ get_if_addrs = "0.5.3"
[features]
default = ["aws-lc-rs"]
clap = ["dep:clap"]
aws-lc-rs = ["tokio-rustls/aws-lc-rs", "rcgen/aws_lc_rs", "hickory-resolver/tls-aws-lc-rs", "hickory-resolver/https-aws-lc-rs"]
aws-lc-rs = [
"tokio-rustls/aws-lc-rs",
"rcgen/aws_lc_rs",
"hickory-resolver/tls-aws-lc-rs",
"hickory-resolver/https-aws-lc-rs",
]
aws-lc-rs-bindgen = ["dep:aws-lc-rs", "aws-lc-rs/bindgen"]
ring = ["tokio-rustls/ring", "rcgen/ring", "hickory-resolver/tls-ring", "hickory-resolver/https-ring"]