jorisvandenbossche opened a new pull request, #50851:
URL: https://github.com/apache/arrow/pull/50851

   …check
   
   ### Rationale for this change
   
   Fix #46646 by replacing the `lintr` pre-commit hook (which requires system 
R/Rscript to bootstrap, causing hard failures when R isn't installed, end even 
if installed still gives errors when using conda 
(https://github.com/apache/arrow/issues/47997)) with jarl 
(https://jarl.etiennebacher.com/, a Rust-native R linter distributed as a 
standalone binary or as a python package).
   
   ### What changes are included in this PR?
   
   - `.pre-commit-config.yaml`: swapped the local `lintr` hook for 
`etiennebacher/jarl-pre-commit` (jarl-check, rev 0.5.0)
   - `r/jarl.toml`: new config file, excludes the same generated files that 
`r/.lintr` and `r/air.toml` already exclude
     - NOTE: for now I did not remove `r/.lintr` in case people would use that 
locally or through their IDE, so it might be useful to keep. But for our CI it 
could be removed.
   - `.github/workflows/dev.yml`: dropped r-base from the CI apt install and 
the now-unused `~/.local/share/renv/cache` from the pre-commit cache path, 
since no pre-commit hook needs R anymore
   - `r/vignettes/developers/workflow.Rmd` and 
`docs/source/developers/guide/step_by_step/styling.rst`: updated references 
from lintr to jarl
   
   At the moment, running `jarl check` gives 42 pre-existing errors (13 
auto-fixable), so CI will be failing at the moment. 
   Those should be fixed (or temporarily suppressed) in a next commit.
   
   Also note the differences between lintr and jarl listed at 
https://github.com/apache/arrow/issues/46646#issuecomment-5253845795. 
Especially no cyclocomp (complexity) or object_length equivalent exists in 
jarl, so we have to see if we are fine with dropping those checks.
   
   Code changes are largely generated by Claude, I did review everything, but I 
am no R developer ..
   
   ### Are these changes tested?
   
   pre-commit runs on CI
   
   ### Are there any user-facing changes?
   
   No
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to