riskassessment icon indicating copy to clipboard operation
riskassessment copied to clipboard

Styling & linting

Open AARON-CLARK opened this issue 2 years ago • 2 comments

styling/linting

Is there interest in making to commitment to adhere to a workflow that includes this? If so, a first step would be getting the current code base compliant to prepare for turning on the actions. Running lintr::lint_package() on the dev branch currently flags 1,919 lines with issues that should be resolved. This drops to 533 after running styler::style_pkg(). We'd want to tackle these in one form or another (e.g. fixing, ignoring, changing linting rules, etc.) prior to turning on a GHA lint-checker that fails if any discrepancies are found.

Personally, I think this is a good idea. However, the effort, discussion, and decision making involved in the prep probably warrants its own issue as it is not trivial.

Originally posted by @borgmaan in https://github.com/pharmaR/riskassessment/issues/270#issuecomment-1379364475

AARON-CLARK avatar Jan 25 '23 17:01 AARON-CLARK

At 1/31 meetup, @AARON-CLARK said he'll prioritize researching the various lintr & styler options that are associated with this task by our next meetup. Also, he'll reference the tidyverse style guide.

AARON-CLARK avatar Jan 31 '23 17:01 AARON-CLARK

I'd suggest we do this! Start with running styler::style_pkg() in a single PR, then add the lintr::lint_package() as a step that needs to be performed with every PR (optimally via GHA via usethis::use_github_action("lint"), but in the meantime could be added to the PR checklist).

aclark02-arcus avatar Jul 03 '24 11:07 aclark02-arcus