This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new 39c7091  chore: Add cargo sort check (#51)
39c7091 is described below

commit 39c709179cc4c6d2189a7c6c25f319ed6e9db584
Author: Renjie Liu <[email protected]>
AuthorDate: Wed Sep 13 16:31:59 2023 +0800

    chore: Add cargo sort check (#51)
    
    * chore: Add cargo sort check
    
    * Sort
---
 .github/workflows/ci.yml  | 13 ++++++-------
 Makefile                  |  8 ++++++--
 crates/iceberg/Cargo.toml | 27 +++++++++++++--------------
 3 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8f02786..c0e6261 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -39,18 +39,17 @@ jobs:
         uses: apache/skywalking-eyes/[email protected]
 
       - name: Cargo format
-        run: cargo fmt --all -- --check
+        run: make check-fmt
 
       - name: Check diff
         run: git diff --exit-code
 
-  check_clippy:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v3
-
       - name: Cargo clippy
-        run: cargo clippy --all-targets --all-features --workspace -- -D 
warnings
+        run: make check-clippy
+
+      - name: Cargo sort
+        run: make cargo-sort
+
 
   build:
     runs-on: ${{ matrix.os }}
diff --git a/Makefile b/Makefile
index ee0bbd7..4881716 100644
--- a/Makefile
+++ b/Makefile
@@ -18,10 +18,14 @@
 check-fmt:
        cargo fmt --all -- --check
 
-clippy:
+check-clippy:
        cargo clippy --all-targets --all-features --workspace -- -D warnings
 
-check: check-fmt clippy
+cargo-sort:
+       cargo install cargo-sort
+       cargo sort -c -w
+
+check: check-fmt check-clippy cargo-sort
 
 test:
        cargo test --no-fail-fast --all-targets --all-features --workspace
diff --git a/crates/iceberg/Cargo.toml b/crates/iceberg/Cargo.toml
index 665ccad..d025734 100644
--- a/crates/iceberg/Cargo.toml
+++ b/crates/iceberg/Cargo.toml
@@ -27,25 +27,24 @@ license = "Apache-2.0"
 keywords = ["iceberg"]
 
 [dependencies]
-apache-avro = "0.15"
-serde = {version = "^1.0", features = ["rc"]}
-serde_bytes = "0.11.8"
-serde_json = "^1.0"
-serde_derive = "^1.0"
 anyhow = "1.0.72"
-once_cell = "1"
-rust_decimal = "1.31.0"
-chrono = "0.4"
-uuid = "1.4.1"
-ordered-float = "3.7.0"
-bitvec = "1.0.1"
-serde_repr = "0.1.16"
-itertools = "0.11"
+apache-avro = "0.15"
 bimap = "0.6"
+bitvec = "1.0.1"
+chrono = "0.4"
 derive_builder = "0.12.0"
 either = "1"
+itertools = "0.11"
 lazy_static = "1"
-
+once_cell = "1"
+ordered-float = "3.7.0"
+rust_decimal = "1.31.0"
+serde = { version = "^1.0", features = ["rc"] }
+serde_bytes = "0.11.8"
+serde_derive = "^1.0"
+serde_json = "^1.0"
+serde_repr = "0.1.16"
+uuid = "1.4.1"
 
 [dev-dependencies]
 pretty_assertions = "1.4.0"

Reply via email to