dfe-analytical-services / dfe-analytical-services/dfeshiny

Investigate swapping over to the new 'air' package

Open
#107 0 comments 0 reactions 1 assignee Claimed by @alex-rogers-hub View on GitHub
Dominant language
R
Stars
7
Forks
3
Avg merge
8h 54m
Merged PRs (30d)
2

Description

## Is your feature request related to a problem? Please describe.
Currently we use styler in our commit hooks (https://github.com/dfe-analytical-services/dfeshiny/blob/main/R/pre_commit.R) to format R code automatically, for larger projects this can be noticeably slow and create friction for analysts adopting code styling best practices.

[Air](https://www.tidyverse.org/blog/2025/02/air/#installing-air) has recently been released and claims to be as much as 100x faster than styler, seems like we should look at swapping over to this.

## Describe the solution you'd like
Ideally we:
- swap styler out for air in our commit hooks (https://github.com/dfe-analytical-services/dfeshiny/blob/main/R/pre_commit.R)
- keep it so that analysts can run a single command `dfeshiny::init_hooks()` to add or update their commit hooks on a project
- keep it so that analysts joining a project can run the commit hooks without additional setup beyond cloning a repo and running `renv::restore()`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.