Skip to content

Commit 4ed0916

Browse files
authored
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 <petridish@gmail.com> Signed-off-by: Bryce Mecum <petridish@gmail.com>
1 parent 5617e8d commit 4ed0916

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

.github/workflows/dev.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ jobs:
6464
~/.cache/pre-commit
6565
~/.local/share/renv/cache
6666
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
67-
- name: Install Air
68-
uses: posit-dev/setup-air@63e80dedb6d275c94a3841e15e5ff8691e1ab237 # v1.0.0
6967
- name: Run pre-commit
7068
run: |
7169
pre-commit run --all-files --color=always --show-diff-on-failure

.pre-commit-config.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,12 @@ repos:
203203
pass_filenames: false
204204
files: >-
205205
^r/.*\.(R|Rmd)$
206-
- repo: local
206+
- repo: https://github.com/posit-dev/air-pre-commit
207+
rev: 0.8.2
207208
hooks:
208209
- id: air-format
209210
alias: r
210211
name: R Format (Air)
211-
language: system
212-
entry: air format r --check
213-
files: >-
214-
^r/.*\.R$
215212
- repo: https://github.com/pre-commit/mirrors-clang-format
216213
rev: v18.1.8
217214
hooks:

0 commit comments

Comments
 (0)