Skip to content

Commit 42f8b08

Browse files
committed
Don't add extra (); .fun already takes care of that
1 parent e65529a commit 42f8b08

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

R/roxygen.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@ check_uses_roxygen <- function(whos_asking) {
128128
return(invisible())
129129
}
130130

131+
whos_asking_fn <- sub("()", "", whos_asking, fixed = TRUE)
131132
ui_abort(c(
132133
"Package {.pkg {project_name()}} does not use roxygen2.",
133-
"{.fun {whos_asking}} can not work without it.",
134+
"{.fun {whos_asking_fn}} can not work without it.",
134135
"You might just need to run {.run devtools::document()} once, then try again."
135136
))
136137
}

R/use_import_from.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,16 @@ check_has_package_doc <- function(whos_asking) {
5858
return(invisible(TRUE))
5959
}
6060

61+
whos_asking_fn <- sub("()", "", whos_asking, fixed = TRUE)
6162
msg <- c(
62-
"!" = "{.fun {whos_asking}} requires package-level documentation.",
63+
"!" = "{.fun {whos_asking_fn}} requires package-level documentation.",
6364
" " = "Would you like to add it now?"
6465
)
6566
if (is_interactive() && ui_yep(msg)) {
6667
use_package_doc()
6768
} else {
6869
ui_abort(c(
69-
"{.fun {whos_asking}} requires package-level documentation.",
70+
"{.fun {whos_asking_fn}} requires package-level documentation.",
7071
"You can add it by running {.run usethis::use_package_doc()}."
7172
))
7273
}

0 commit comments

Comments
 (0)