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

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


The following commit(s) were added to refs/heads/main by this push:
     new 4ed0916235 GH-49700: [R][CI][Dev] Use air precommit hook (#49701)
4ed0916235 is described below

commit 4ed091623565a251a8058f6cada4340ce2f3f9b8
Author: Bryce Mecum <[email protected]>
AuthorDate: Thu Apr 9 22:21:23 2026 -0700

    GH-49700: [R][CI][Dev] Use air precommit hook (#49701)
    
    ### Rationale for this change
    
    Simplifies setup of the R formatter air for local devs and in CI by moving 
from explicitly managed air to using a new official pre-commit hook.
    
    ### What changes are included in this PR?
    
    Replace local hook with https://github.com/posit-dev/air-pre-commit.
    
    ### Are these changes tested?
    
    Yes, locally.
    
    ### Are there any user-facing changes?
    
    No.
    * GitHub Issue: #49700
    
    Authored-by: Bryce Mecum <[email protected]>
    Signed-off-by: Bryce Mecum <[email protected]>
---
 .github/workflows/dev.yml | 2 --
 .pre-commit-config.yaml   | 7 ++-----
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml
index d8ee21761a..e946d9cc3a 100644
--- a/.github/workflows/dev.yml
+++ b/.github/workflows/dev.yml
@@ -64,8 +64,6 @@ jobs:
             ~/.cache/pre-commit
             ~/.local/share/renv/cache
           key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
-      - name: Install Air
-        uses: posit-dev/setup-air@63e80dedb6d275c94a3841e15e5ff8691e1ab237 # 
v1.0.0
       - name: Run pre-commit
         run: |
           pre-commit run --all-files --color=always --show-diff-on-failure
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1a1267d32c..0544ff11bf 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -203,15 +203,12 @@ repos:
         pass_filenames: false
         files: >-
           ^r/.*\.(R|Rmd)$
-  - repo: local
+  - repo: https://github.com/posit-dev/air-pre-commit
+    rev: 0.8.2
     hooks:
       - id: air-format
         alias: r
         name: R Format (Air)
-        language: system
-        entry: air format r --check
-        files: >-
-            ^r/.*\.R$
   - repo: https://github.com/pre-commit/mirrors-clang-format
     rev: v18.1.8
     hooks:

Reply via email to