Skip to content

Commit 0d14e91

Browse files
Change option name to be inline with usethis
1 parent 2af8943 commit 0d14e91

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

R/addins.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ get_addins_style_transformer <- function() {
153153

154154
communicate_addins_style_transformers <- function() {
155155
style_name <- get_addins_style_transformer_name()
156-
if (getOption("styler.communicate", TRUE)) {
156+
if (!getOption("styler.quiet", FALSE)) {
157157
cat("Using style transformers `", style_name, "`\n", sep = "")
158158
}
159159
}

R/communicate.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
communicate_warning <- function(changed, transformers) {
1010
if (any(changed, na.rm = TRUE) &&
1111
!can_verify_roundtrip(transformers) &&
12-
getOption("styler.communicate", TRUE)
12+
!getOption("styler.quiet", FALSE)
1313
) {
1414
cat("Please review the changes carefully!", fill = TRUE)
1515
}
@@ -22,7 +22,7 @@ communicate_warning <- function(changed, transformers) {
2222
#' @param ruler_width Integer used to determine the width of the ruler.
2323
#' @keywords internal
2424
communicate_summary <- function(changed, ruler_width) {
25-
if (getOption("styler.communicate", TRUE)) {
25+
if (!getOption("styler.quiet", FALSE)) {
2626
cli::cat_rule(width = max(40, ruler_width))
2727
cat("Status\tCount\tLegend \n")
2828
cli::cat_bullet("\t", sum(!changed, na.rm = TRUE), "\tFile unchanged.", bullet = "tick")

R/transform-files.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ transform_files <- function(files, transformers, include_roxygen_examples, dry)
1515
transformer <- make_transformer(transformers, include_roxygen_examples)
1616
max_char <- min(max(nchar(files), 0), getOption("width"))
1717
len_files <- length(files)
18-
if (len_files > 0L && getOption("styler.communicate", TRUE)) {
18+
if (len_files > 0L && !getOption("styler.quiet", FALSE)) {
1919
cat("Styling ", len_files, " files:\n")
2020
}
2121

@@ -51,7 +51,7 @@ transform_file <- function(path,
5151
max_char_after_message_path <- nchar(message_before) + max_char_path + 1
5252
n_spaces_before_message_after <-
5353
max_char_after_message_path - char_after_path
54-
if (getOption("styler.communicate", TRUE)) {
54+
if (!getOption("styler.quiet", FALSE)) {
5555
cat(
5656
message_before, path,
5757
rep_char(" ", max(0L, n_spaces_before_message_after)),
@@ -62,7 +62,7 @@ transform_file <- function(path,
6262

6363
bullet <- ifelse(is.na(changed), "warning", ifelse(changed, "info", "tick"))
6464

65-
if (getOption("styler.communicate", TRUE)) {
65+
if (!getOption("styler.quiet", FALSE)) {
6666
cli::cat_bullet(bullet = bullet)
6767
}
6868
invisible(changed)

R/zzz.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
styler.addins_style_transformer = "styler::tidyverse_style()",
88
styler.ignore_start = "# styler: off",
99
styler.ignore_stop = "# styler: on",
10-
styler.communicate = TRUE
10+
styler.quiet = FALSE
1111
)
1212
toset <- !(names(op.styler) %in% names(op))
1313
if (any(toset)) options(op.styler[toset])

0 commit comments

Comments
 (0)