REDCapR icon indicating copy to clipboard operation
REDCapR copied to clipboard

styler package

Open wibeasley opened this issue 1 year ago • 1 comments

@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(

)

wibeasley avatar Jul 14 '23 12:07 wibeasley

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)

gabrielodom avatar Jul 14 '23 18:07 gabrielodom