Skip to content

Commit

Permalink
Add centralized documentation for global rlang options (#915)
Browse files Browse the repository at this point in the history
  • Loading branch information
smingerson committed Feb 23, 2020
1 parent 4ca000c commit e3c3e1e
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 4 deletions.
12 changes: 8 additions & 4 deletions NEWS.md
@@ -1,11 +1,15 @@

# rlang (development version)

* `arg_match()` now detects and suggests possible typos in provided arguments
(@jonkeane, #798).
* All rlang options are now documented in a centralised place (#899,
@smingerson).

* `arg_match()` now gives an error if argument is of length greater than 1 and doesn't exactly
match the values input, similar to base `match.arg` (#914, @AliciaSchep)
* `arg_match()` now detects and suggests possible typos in provided
arguments (@jonkeane, #798).

* `arg_match()` now gives an error if argument is of length greater
than 1 and doesn't exactly match the values input, similar to base
`match.arg` (#914, @AliciaSchep)

# rlang 0.4.4

Expand Down
23 changes: 23 additions & 0 deletions R/faq.R
@@ -0,0 +1,23 @@
#' Global options for rlang
#'
#' @description
#' rlang has several options which may be set globally to control
#' behavior. A brief description of each is given here. If any functions
#' are referenced, refer to their documentation for additional details.
#'
#' * `rlang_interactive`: A logical value used by [is_interactive()]. This
#' can be set to `TRUE` to test interactive behavior in unit tests,
#' for example.
#'
#' * `rlang_backtrace_on_error`: A character string which controls whether
#' backtraces are displayed with error messages, and the level of
#' detail they print. See [rlang_backtrace_on_error] for the possible option values.
#'
#' * `rlang_trace_format_srcrefs`: A logical value used to control whether
#' srcrefs are printed as part of the backtrace.
#'
#' * `rlang_trace_top_env`: An environment which will be treated as the
#' top-level environment when printing traces. See [trace_back()]
#' for examples.
#' @name faq-options
NULL
3 changes: 3 additions & 0 deletions _pkgdown.yml
Expand Up @@ -280,3 +280,6 @@ reference:
contents:
- matches("weakref")
- matches("wref")
- title: FAQ
contents:
- matches("faq")
23 changes: 23 additions & 0 deletions man/faq-options.Rd

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

0 comments on commit e3c3e1e

Please sign in to comment.