Skip to content

Commit 27c0c53

Browse files
committed
Remove redundant function prettify_one()
1 parent 584a294 commit 27c0c53

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

R/ws.R

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,6 @@ style_file <- function(path,
145145
transformers = style(...)) {
146146
withr::with_dir(
147147
dirname(path),
148-
prettify_one(transformers, basename(path))
148+
transform_files(basename(path), transformers)
149149
)
150150
}
151-
152-
#' Prettify one R file
153-
#'
154-
#' This is a helper function for style_dir.
155-
#' @inheritParams style_dir
156-
#' @param path The path to a file that should be styled.
157-
prettify_one <- function(transformers, path) {
158-
if (!grepl("\\.[r](md)?$", path, ignore.case = TRUE))
159-
stop(path, " is not an R or Rmd file")
160-
transform_files(path, transformers)
161-
}

man/prettify_one.Rd

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)