Skip to content

Commit

Permalink
ci: sort elements in Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Aug 13, 2024
1 parent d5a4f9c commit 90096ef
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 15 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
cd "$PKG"
echo "Testing: $PKG"
cargo fmt -- --check
cd -
cd - > /dev/null
done
MSRV:
Expand Down Expand Up @@ -114,3 +114,22 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: devskim-results.sarif

CargoSort:
name: Check order in Cargo.toml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cargo-sort
- run: |
set -eu
for PKG in \
rinja rinja_actix rinja_axum rinja_derive rinja_derive_standalone \
rinja_parser rinja_rocket rinja_warp testing
do
cd "$PKG"
cargo sort --check --check-format --grouped
cd - > /dev/null
done
12 changes: 6 additions & 6 deletions rinja/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ readme = "../README.md"
edition = "2021"
rust-version = "1.71"

[package.metadata.docs.rs]
features = ["default", "serde_json"]
rustdoc-args = ["--generate-link-to-definition", "--cfg=docsrs"]

[badges]
maintenance = { status = "actively-developed" }

Expand All @@ -34,14 +38,14 @@ with-warp = ["rinja_derive/with-warp"]
[dependencies]
rinja_derive = { version = "=0.3.0", path = "../rinja_derive" }

itoa = "1.0.11"

humansize = { version = "2", optional = true }
num-traits = { version = "0.2.6", optional = true }
percent-encoding = { version = "2.1.0", optional = true }
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }

itoa = "1.0.11"

[dev-dependencies]
criterion = "0.5"

Expand All @@ -53,7 +57,3 @@ required-features = ["serde_json"]
[[bench]]
name = "escape"
harness = false

[package.metadata.docs.rs]
features = ["default", "serde_json"]
rustdoc-args = ["--generate-link-to-definition", "--cfg=docsrs"]
1 change: 1 addition & 0 deletions rinja_actix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rust-version = "1.71"

[dependencies]
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-actix-web"] }

actix-web = { version = "4", default-features = false }

[dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions rinja_axum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ readme = "README.md"

[dependencies]
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-axum"] }

axum-core = "0.4"
http = "1.0"

Expand Down
5 changes: 3 additions & 2 deletions rinja_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,20 @@ with-warp = []
parser = { package = "rinja_parser", version = "=0.3.0", path = "../rinja_parser" }

basic-toml = { version = "0.1.1", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }

memchr = "2"
mime = "0.3"
mime_guess = "2"
once_map = "0.4.18"
proc-macro2 = "1"
quote = "1"
serde = { version = "1.0", optional = true, features = ["derive"] }
syn = "2.0.3"

[dev-dependencies]
console = "0.15.8"
similar = "2.6.0"
prettyplease = "0.2.20"
similar = "2.6.0"
syn = { version = "2.0.3", features = ["full"] }

[lints.rust]
Expand Down
8 changes: 4 additions & 4 deletions rinja_derive_standalone/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ with-warp = []
parser = { package = "rinja_parser", version = "=0.3.0", path = "../rinja_parser" }

basic-toml = { version = "0.1.1", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }

memchr = "2"
mime = "0.3"
mime_guess = "2"
once_map = "0.4.18"
proc-macro2 = "1"
quote = "1"
serde = { version = "1.0", optional = true, features = ["derive"] }
syn = "2"

[dev-dependencies]
criterion = "0.5"

console = "0.15.8"
similar = "2.6.0"
criterion = "0.5"
prettyplease = "0.2.20"
similar = "2.6.0"
syn = { version = "2.0.3", features = ["full"] }

[[bench]]
Expand Down
1 change: 1 addition & 0 deletions rinja_rocket/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rust-version = "1.71"

[dependencies]
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-rocket"] }

rocket = { version = "0.5", default-features = false }

[dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions rinja_warp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rust-version = "1.71"

[dependencies]
rinja = { version = "0.3.0", path = "../rinja", default-features = false, features = ["with-warp"] }

warp = { version = "0.3", default-features = false }

[dev-dependencies]
Expand Down
4 changes: 3 additions & 1 deletion testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ serde_json = ["dep:serde_json", "rinja/serde_json"]

[dependencies]
rinja = { path = "../rinja", version = "0.3.0" }

serde_json = { version = "1.0", optional = true }

[dev-dependencies]
rinja = { path = "../rinja", version = "0.3.0", features = ["serde_json"] }

criterion = "0.5"
phf = { version = "0.11", features = ["macros" ]}
phf = { version = "0.11", features = ["macros" ] }
trybuild = "1.0.76"

[[bench]]
Expand Down
2 changes: 1 addition & 1 deletion testing/tests/filter_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ fn filter_block_include() {
<body class=""><h1>Metadata</h1>
99</body>
100</body>
</html>"#
);
}
Expand Down
1 change: 1 addition & 0 deletions tomlfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
table_order = ["workspace", "package", "badges", "lib", "features", "dependencies", "build-dependencies", "dev-dependencies", "bench"]

0 comments on commit 90096ef

Please sign in to comment.