diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cbcc447679..02da772b9a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -73,8 +73,6 @@ jobs: key: ${{ runner.os }}-cargo-${{ steps.rust.outputs.version }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo-${{ steps.rust.outputs.version }}- - - name: Rustfmt - run: cargo fmt --all -- --check - name: Clippy run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings - name: Test diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 17ac98a2be..5be4d0f4d8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -86,10 +86,8 @@ repos: hooks: - id: isort types_or: [python] - # TODO: Change this to vala-lang/vala-lint after - # https://github.com/vala-lang/vala-lint/pull/179 is merged. - - repo: https://github.com/kou/vala-lint - rev: pre-commit-hook + - repo: https://github.com/vala-lang/vala-lint + rev: 8ae2bb65fe66458263d94711ae4ddd978faece00 hooks: - id: vala-lint - repo: local @@ -105,5 +103,11 @@ repos: pass_filenames: true files: '(c/driver_manager/adbc_driver_manager\.)|(^adbc\.h)' entry: "./ci/scripts/run_cgo_drivermgr_check.sh" + - repo: https://github.com/doublify/pre-commit-rust + rev: v1.0 + hooks: + - id: fmt + name: rustfmt + args: ["--all", "--manifest-path", "rust/Cargo.toml", "--"] exclude: "^c/vendor/.*"