Closed ChristineStawitz-NOAA closed 2 years ago
I think the unresolved question from the discussion about the workflow is when does the code go through a styler, before or after a pull request? I have only worked on projects that do the latter but I know both are options.
Thanks Kelli for explaining the unresolved question. I also have not tried option 1 (before a PR) and I haven't had any issues with the latter option.
Notable integration options from styler developers can be found here: https://styler.r-lib.org/articles/third-party-integrations.html
Details about how to use styler as a pre-commit hook can be found here: https://lorenzwalthert.github.io/precommit/. It seems that "when any file is changed due to running a hook or the hook script errors, the commit will fail". May need some Git training if we use this approach.
@ChristineStawitz-NOAA, I removed myself from the assignees and please feel free to add the workflow leader there. I could not add Kristan there for some reason.
Consider discussion from https://github.com/NOAA-FIMS/collaborative_workflow/issues/22 which I am closing as a duplicate
added an actoin for both clang-tidy
and styler
I suggest that we use following reusable workflow to style R code:
ghactions4r::use_style_r_code()
More details about ghactions4r can be found here: https://github.com/nmfs-fish-tools/ghactions4r