You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ks...@apache.org on 2019/03/01 07:20:45 UTC

[arrow] branch master updated: ARROW-4071: [Rust] Add rustfmt as a pre-commit hook

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

kszucs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new b536457  ARROW-4071: [Rust] Add rustfmt as a pre-commit hook
b536457 is described below

commit b53645799398c0a8a644697988f6d76231777aca
Author: Nicolas Trinquier <ns...@protonmail.ch>
AuthorDate: Fri Mar 1 08:20:27 2019 +0100

    ARROW-4071: [Rust] Add rustfmt as a pre-commit hook
    
    Author: Nicolas Trinquier <ns...@protonmail.ch>
    
    Closes #3753 from ntrinquier/ARROW-4071 and squashes the following commits:
    
    ecdf6e31 <Nicolas Trinquier> Add pre-commit hook to check formatting
---
 .pre-commit-config.yaml | 8 ++++++++
 rust/README.md          | 1 -
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 4e0c7b2..e5f5c59 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 b09150b..a968052 100644
--- a/rust/README.md
+++ b/rust/README.md
@@ -59,4 +59,3 @@ and check for lint issues:
 ```bash
 cargo +stable fmt --all -- --check
 ```
-