Skip to content

Commit

Permalink
Merge a4e115b into 2fa7369
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr authored Aug 21, 2022
2 parents 2fa7369 + a4e115b commit cf17b2e
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 20 deletions.
2 changes: 1 addition & 1 deletion API
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ specify_reindention(regex_pattern = NULL, indention = 0, comments_only = TRUE)
specify_transformers_drop(spaces = NULL, indention = NULL, line_breaks = NULL, tokens = NULL)
style_dir(path = ".", ..., style = tidyverse_style, transformers = style(...), filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "Qmd"), recursive = TRUE, exclude_files = NULL, exclude_dirs = c("packrat", "renv"), include_roxygen_examples = TRUE, base_indention = 0, dry = "off")
style_file(path, ..., style = tidyverse_style, transformers = style(...), include_roxygen_examples = TRUE, base_indention = 0, dry = "off")
style_pkg(pkg = ".", ..., style = tidyverse_style, transformers = style(...), filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "Qmd"), exclude_files = "R/RcppExports.R", exclude_dirs = c("packrat", "renv"), include_roxygen_examples = TRUE, base_indention = 0, dry = "off")
style_pkg(pkg = ".", ..., style = tidyverse_style, transformers = style(...), filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "Qmd"), exclude_files = c("R/RcppExports.R", "R/cpp11.R"), exclude_dirs = c("packrat", "renv"), include_roxygen_examples = TRUE, base_indention = 0, dry = "off")
style_text(text, ..., style = tidyverse_style, transformers = style(...), include_roxygen_examples = TRUE, base_indention = 0)
tidyverse_math_token_spacing()
tidyverse_reindention()
Expand Down
12 changes: 6 additions & 6 deletions R/ui-styling.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ NULL
#' Prettify R source code
#'
#' Performs various substitutions in all `.R` files in a package
#' (code and tests). One can also (optionally) style `.Rmd`, `.Rmarkdown` and/or
#' `.qmd`, `.Rnw` files (vignettes and readme) by changing the `filetype`
#' argument.
#' (code and tests), `.Rmd`, `.Rmarkdown` and/or
#' `.qmd`, `.Rnw` files (vignettes and readme).
#' Carefully examine the results after running this function!
#'
#' @param pkg Path to a (subdirectory of an) R package.
#' @param ... Arguments passed on to the `style` function.
#' @param ... Arguments passed on to the `style` function,
#' see [tidyverse_style()] for the default argument.
#' @param style A function that creates a style guide to use, by default
#' [tidyverse_style()] (without the parentheses). Not used
#' [`tidyverse_style`]. Not used
#' further except to construct the argument `transformers`. See
#' [style_guides()] for details.
#' @param transformers A set of transformer functions. This argument is most
Expand Down Expand Up @@ -76,7 +76,7 @@ style_pkg <- function(pkg = ".",
style = tidyverse_style,
transformers = style(...),
filetype = c("R", "Rprofile", "Rmd", "Rmarkdown", "Rnw", "Qmd"),
exclude_files = "R/RcppExports.R",
exclude_files = c("R/RcppExports.R", "R/cpp11.R"),
exclude_dirs = c("packrat", "renv"),
include_roxygen_examples = TRUE,
base_indention = 0,
Expand Down
6 changes: 5 additions & 1 deletion inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ config
CONST
coventions
covr
cpp
cran
cre
cynkra
datastructures
dec
deps
Expand Down Expand Up @@ -95,6 +97,7 @@ ixmypi
ized
Jupyterlab
Kirill
kirill
knitr
krlmlr
labelled
Expand Down Expand Up @@ -128,6 +131,7 @@ nph
NUM
oldrel
oneliner
ORCID
os
ourself
packagemanager
Expand All @@ -149,8 +153,8 @@ prettycode
PRs
purrr
qmd
questionr
Qmd
questionr
rcmdcheck
RcppExports
rds
Expand Down
5 changes: 3 additions & 2 deletions man/style_dir.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions man/style_file.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions man/style_pkg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions man/style_text.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf17b2e

Please sign in to comment.