This is a GitHub template to create and distribute a custom {styler} style guide. For more info, see the {styler} documentation. You can use this template to create a GitHub repo by pressing the green button:
Here’s what you have to do once you created your repo from the template.
-
search for
putyourstyleguidehere_style
and replace it with the name of your style guide. -
Adapt the authors field in
DESCRIPTION
. -
In
create_style_guide()
, ensure thestyle_guide_name
matches the expected format, e.g. styler has"styler::tidyverse_style@https://github.com/r-lib"
. Seehelp(create_style_guide, package = "styler")
for details. -
adapt the function
putyourstyleguidehere_style()
(the drop-in forstyler::tidyverse_style
) such that it does what you want. Currently, all the style guide is doing is to replace<-
with=
-
add tests.
-
remove all of the above instructions.
The goal of {styler.putyourstyleguidehere} is… It is a third-party style guide for {styler}.
You can install the released version of {styler.putyourstyleguidehere} from GitHub with:
remotes::install_github("putyourstyleguidehere/styler.putyourstyleguidehere")
This is a basic example of how to style code with it.
library(styler.putyourstyleguidehere)
cache_deactivate()
text <- "x <- 4
y = 3
a;
"
style_text(text)