Skip to content
/ styler.yours Public template

A template repository for creating third-party style guides for {styler}

License

Notifications You must be signed in to change notification settings

lorenzwalthert/styler.yours

Repository files navigation

styler.putyourstyleguidehere

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 the style_guide_name matches the expected format, e.g. styler has "styler::tidyverse_style@https://github.com/r-lib". See help(create_style_guide, package = "styler") for details.

  • adapt the function putyourstyleguidehere_style() (the drop-in for styler::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.

Lifecycle: experimental R-CMD-check

The goal of {styler.putyourstyleguidehere} is… It is a third-party style guide for {styler}.

Installation

You can install the released version of {styler.putyourstyleguidehere} from GitHub with:

remotes::install_github("putyourstyleguidehere/styler.putyourstyleguidehere")

Example

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)

About

A template repository for creating third-party style guides for {styler}

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages