Skip to content

Commit

Permalink
ci(rust): move rustfmt to pre-commit (#1750)
Browse files Browse the repository at this point in the history
As suggested in
#1749 (comment).
  • Loading branch information
mbrobbel authored Apr 23, 2024
1 parent 93dda62 commit 3f80831
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/.*"

0 comments on commit 3f80831

Please sign in to comment.