OuhscBbmc / REDCapR

R utilities for interacting with REDCap
https://ouhscbbmc.github.io/REDCapR
Other
112 stars 46 forks source link

styler package #498

Open wibeasley opened 1 year ago

wibeasley commented 1 year ago

@gabrielodom & @RaymondBalise suggested I also use the styler package, in addition to lintr, goodpractice, & BiocCheck.

I like most of its suggestions. Maybe I can loosen up its alignment standards (eg,

I like this

status_code <- response$status
success     <- (status_code == 200L)
raw_text    <- httr::content(

vs this

status_code <- response$status
success <- (status_code == 200L)
raw_text <- httr::content(

)

gabrielodom commented 1 year ago

To me, there should be some flexibility here, especially if some of your names are quite longer than others. So, I agree with your example above, but in this example below I would not. That is, I prefer this:

aSuperLongComplicatedNameThatProbablyShouldBeMuchShorterButWhoCares <- f(x)
shortName <- g(x)

to this:

aSuperLongComplicatedNameThatProbablyShouldBeMuchShorterButWhoCares <- f(x)
shortName  ........................................................ <- g(x)