Skip to content

Commit 7248c40

Browse files
more explicit warnings for roxygen comments
1 parent 19fcc39 commit 7248c40

File tree

8 files changed

+24
-17
lines changed

8 files changed

+24
-17
lines changed

R/transform-files.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,9 @@ can_verify_roundtrip <- function(transformers) {
353353
#'
354354
#' If scope was set to "line_breaks" or lower (compare [tidyverse_style()]),
355355
#' we can compare the expression before and after styling and return an error if
356-
#' it is not the same. Note that this method ignores comments and no
357-
#' verification can be conducted if tokens are in the styling scope.
356+
#' it is not the same. Note that this method ignores roxygen code examples and
357+
#' comments and no verification can be conducted if tokens are in the styling
358+
#' scope.
358359
#' @inheritParams expressions_are_identical
359360
#' @importFrom rlang abort
360361
#' @examples

R/ui-styling.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ NULL
3636
#' The following section describes when and how styling is guaranteed to
3737
#' yield correct code.
3838
#'
39-
#' If tokens are to be styled (as specified with the `scope` argument), no tokens
40-
#' are changed and the abstract syntax tree (AST) should not change.
39+
#' If tokens are not in the styling scope (as specified with the `scope`
40+
#' argument), no tokens are changed and the abstract syntax tree (AST) should
41+
#' not change.
4142
#' Hence, it is possible to validate the styling by comparing whether the parsed
4243
#' expression before and after styling have the same AST.
43-
#' This comparison omits comments. styler compares
44+
#' This comparison omits roxygen code examples and comments. styler throws an
4445
#' error if the AST has changed through styling.
4546
#'
4647
#' Note that if tokens are to be styled, such a comparison is not conducted because

inst/WORDLIST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ EOLs
5151
eq
5252
EQ
5353
eval
54+
examplesIf
5455
expr
5556
expr EQ
5657
fileext

man/add_roxygen_mask.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/style_dir.Rd

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

man/style_file.Rd

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

man/style_pkg.Rd

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

man/verify_roundtrip.Rd

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

0 commit comments

Comments
 (0)