Skip to content

Commit 9788c39

Browse files
committed
docs: add missing @return tags to exported functions
Add @return roxygen tags and corresponding \value Rd sections for: - spark_bar(), spark_line() (R/spark.R) - ruler() (R/ruler.R) - simple_theme() (R/simple-theme.R) - format_error(), format_warning(), format_message() (R/format-conditions.R) - test_that_cli() (R/test.R) Also fix typo in R/bullets.R: cli_format_bullets_raw() -> cli_bullets_raw() R CMD check --as-cran requires \value for all exported functions.
1 parent 86bdefe commit 9788c39

12 files changed

Lines changed: 29 additions & 1 deletion

R/bullets.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ cli_bullets <- function(
7070

7171
#' List of verbatim items
7272
#'
73-
#' `cli_format_bullets_raw()` is similar to [cli_bullets()], but it does
73+
#' `cli_bullets_raw()` is similar to [cli_bullets()], but it does
7474
#' not perform any inline styling or glue substitutions in the input.
7575
#'
7676
#' `format_bullets_raw()` returns the output instead of printing it.

R/format-conditions.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#' @param message It is formatted via a call to [cli_bullets()].
2727
#' @param .envir Environment to evaluate the glue expressions in.
2828
#'
29+
#' @return A character string containing the formatted message.
2930
#' @seealso These functions support [inline markup][inline-markup].
3031
#' @family functions supporting inline markup
3132
#' @export

R/ruler.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#' Print the helpful ruler to the screen
22
#'
3+
#' @return `NULL`, invisibly. Called for its side effect of printing a
4+
#' ruler to the screen.
35
#' @export
46
#' @param width Ruler width.
57
#' @examples

R/simple-theme.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
#' Detection usually works in recent RStudio versions, and in iTerm
6161
#' on macOS, but not on other platforms.
6262
#'
63+
#' @return A named list that can be used as a cli theme.
6364
#' @seealso [themes], [builtin_theme()].
6465
#' @export
6566

R/spark.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#' ```
3535
#'
3636
#' @param x A numeric vector between 0 and 1
37+
#' @return A character string of class `cli_spark_bar` and `cli_spark`.
3738
#' @export
3839
#' @seealso [spark_line()]
3940

@@ -95,6 +96,7 @@ spark_bar_chars <- function(x, bars = NULL) {
9596
#' ```
9697
#'
9798
#' @inheritParams spark_bar
99+
#' @return A character string of class `cli_spark_line` and `cli_spark`.
98100
#' @export
99101
#' @seealso [spark_bar()]
100102

R/test.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
#' * `"all"`: turn on all hyperlinks,
4242
#' * `"none"`: turn off all hyperlinks.
4343
#'
44+
#' @return The return value of [testthat::test_that()] for the last
45+
#' configuration tested (invisibly).
4446
#' @export
4547
#' @examples
4648
#' # testthat cannot record or compare snapshots when you run these

man/format_error.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/ruler.Rd

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/simple_theme.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/spark_bar.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)