Skip to content

Commit 2b70b52

Browse files
Update roxygen2 to 7.3.3 (#2930)
* Use base:: qualification to avoid linking backports in roxygen2 * continuing... * stopifnot * stopifnot, again * try a regex approach * use roxygen2 7.3.3 * remove TODO
1 parent 0cab403 commit 2b70b52

23 files changed

+28
-28
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Config/Needs/development: pkgload, testthat, patrick
5959
Config/testthat/edition: 3
6060
Encoding: UTF-8
6161
Roxygen: list(markdown = TRUE)
62-
RoxygenNote: 7.3.2
62+
RoxygenNote: 7.3.3
6363
Collate:
6464
'make_linter_from_xpath.R'
6565
'xp_utils.R'

R/any_is_na_linter.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Require usage of `anyNA(x)` over `any(is.na(x))`
22
#'
3-
#' [anyNA()] exists as a replacement for `any(is.na(x))` which is more efficient
3+
#' [base::anyNA()] exists as a replacement for `any(is.na(x))` which is more efficient
44
#' for simple objects, and is at worst equally efficient.
55
#' Therefore, it should be used in all situations instead of the latter.
66
#'

R/condition_message_linter.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' @description
44
#' This linter discourages combining condition functions like [stop()] with string concatenation
5-
#' functions [paste()] and [paste0()]. This is because
5+
#' functions [base::paste()] and [base::paste0()]. This is because
66
#'
77
#' - `stop(paste0(...))` is redundant as it is exactly equivalent to `stop(...)`
88
#' - `stop(paste(...))` is similarly equivalent to `stop(...)` with separators (see examples)

R/conjunct_test_linter.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#' `expect_true(A); expect_true(B)` is better than `expect_true(A && B)`, and
66
#' `expect_false(A); expect_false(B)` is better than `expect_false(A || B)`.
77
#'
8-
#' Similar reasoning applies to `&&` usage inside [stopifnot()] and `assertthat::assert_that()` calls.
8+
#' Similar reasoning applies to `&&` usage inside [base::stopifnot()] and `assertthat::assert_that()` calls.
99
#'
1010
#' Relatedly, `dplyr::filter(DF, A & B)` is the same as `dplyr::filter(DF, A, B)`, but the latter will be more readable
1111
#' / easier to format for long conditions. Note that this linter assumes usages of `filter()` are `dplyr::filter()`;

R/consecutive_assertion_linter.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Force consecutive calls to assertions into just one when possible
22
#'
3-
#' [stopifnot()] accepts any number of tests, so sequences like
3+
#' [base::stopifnot()] accepts any number of tests, so sequences like
44
#' `stopifnot(x); stopifnot(y)` are redundant. Ditto for tests using
55
#' `assertthat::assert_that()` without specifying `msg=`.
66
#'

R/get_source_expressions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ lint_parse_error_r43 <- function(e, source_expression) {
274274

275275
#' Convert a R < 4.3.0 standard parse error message into a lint
276276
#'
277-
#' @param message_info Match of the structured parse error message regex, matched in [lint_parse_error()]
277+
#' @param message_info Match of the structured parse error message regex, matched in `lint_parse_error()`
278278
#' @param source_expression The source expression that generated the parse error
279279
#'
280280
#' @return A [Lint()] based on text mining of the error message captured by `message_info`,

R/implicit_assignment_linter.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' Avoid implicit assignment in function calls
22
#'
33
#' Assigning inside function calls makes the code difficult to read, and should
4-
#' be avoided, except for functions that capture side-effects (e.g. [capture.output()]).
4+
#' be avoided, except for functions that capture side-effects (e.g. [utils::capture.output()]).
55
#'
66
#' @param except A character vector of functions to be excluded from linting.
77
#' @param allow_lazy logical, default `FALSE`. If `TRUE`, assignments that only

R/lengths_linter.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Require usage of `lengths()` where possible
22
#'
3-
#' [lengths()] is a function that was added to base R in version 3.2.0 to
3+
#' [base::lengths()] is a function that was added to base R in version 3.2.0 to
44
#' get the length of each element of a list. It is equivalent to
55
#' `sapply(x, length)`, but faster and more readable.
66
#'

R/list2df_linter.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Recommend direct usage of `data.frame()` to create a data.frame from a list
22
#'
3-
#' [list2DF()] is the preferred way to turn a list of columns into a data.frame.
3+
#' [base::list2DF()] is the preferred way to turn a list of columns into a data.frame.
44
#' Note that it doesn't support recycling; if that's required, use [data.frame()].
55
#'
66
#' @examples

R/paste_linter.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
#' The following issues are linted by default by this linter
66
#' (see arguments for which can be de-activated optionally):
77
#'
8-
#' 1. Block usage of [paste()] with `sep = ""`. [paste0()] is a faster, more concise alternative.
8+
#' 1. Block usage of [base::paste()] with `sep = ""`. [base::paste0()] is a faster, more concise alternative.
99
#' 2. Block usage of `paste()` or `paste0()` with `collapse = ", "`. [toString()] is a direct
1010
#' wrapper for this, and alternatives like [glue::glue_collapse()] might give better messages for humans.
1111
#' 3. Block usage of `paste0()` that supplies `sep=` -- this is not a formal argument to `paste0`, and
1212
#' is likely to be a mistake.
1313
#' 4. Block usage of `paste()` / `paste0()` combined with [rep()] that could be replaced by
14-
#' [strrep()]. `strrep()` can handle the task of building a block of repeated strings
14+
#' [base::strrep()]. `strrep()` can handle the task of building a block of repeated strings
1515
#' (e.g. often used to build "horizontal lines" for messages). This is both more readable and
1616
#' skips the (likely small) overhead of putting two strings into the global string cache when only one is needed.
1717
#'

0 commit comments

Comments
 (0)