Skip to content

Apache DataFusion SQL Query Engine

ARROW-4071: [Rust] Add rustfmt as a pre-commit hook

Nicolas Trinquierc08cb9ba2071
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 4e0c7b2653..e5f5c59ff6 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -29,6 +29,14 @@ repos:
entry: bash -c "git archive HEAD --prefix=apache-arrow/ --output=arrow-src.tar && ./dev/release/run-rat.sh arrow-src.tar"
always_run: true
pass_filenames: false
+ - id: rustfmt
+ name: rustfmt
+ language: system
+ entry: bash -c "cd rust && cargo +stable fmt --all -- --check"
+ files: ^rust/.*\.rs$
+ types:
+ - file
+ - rust
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: v1.2.3
hooks:
diff --git a/rust/README.md b/rust/README.md
index b09150b5d1..a968052f30 100644
--- a/rust/README.md
+++ b/rust/README.md
@@ -59,4 +59,3 @@ and check for lint issues:
```bash
cargo +stable fmt --all -- --check
```
-