Skip to content

Commit 35e65a6

Browse files
Merge pull request #148 from lorenzwalthert/rcmdcheck
make R CMD Check perfect (#148).
2 parents f340918 + 28ea635 commit 35e65a6

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

DESCRIPTION

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ Description:
77
Pretty-prints R code without changing the user's formatting intent.
88
Imports:
99
dplyr,
10-
magrittr,
1110
purrr,
12-
readr,
1311
rlang,
1412
rprojroot,
1513
tibble,

R/nested_to_tree.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ create_tree <- function(text) {
1717
#' @param pd_nested A nested tibble.
1818
#' @return An object of class "Node" and "R6".
1919
#' @examples
20-
#' library("magrittr")
2120
#' code <- "a <- function(x) { if(x > 1) { 1+1 } else {x} }"
22-
#' l1 <- styler:::compute_parse_data_nested(code) %>%
23-
#' styler:::pre_visit(c(styler:::create_filler)) %>%
24-
#' styler:::create_node_from_nested_root()
21+
#' nested_pd <- styler:::compute_parse_data_nested(code)
22+
#' initialized <- styler:::pre_visit(nested_pd, c(styler:::create_filler))
23+
#' styler:::create_node_from_nested_root(initialized)
2524
create_node_from_nested_root <- function(pd_nested) {
2625
n <- data.tree::Node$new("ROOT (token: short_text [lag_newlines/spaces] {id})")
2726
create_node_from_nested(pd_nested, n)

R/styler.R

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,14 @@
44
#' according to a style guide. See the INDEX for more information.
55
#'
66
"_PACKAGE"
7-
if (getRversion() >= "2.15.1") utils::globalVariables(c("."))
7+
if (getRversion() >= "2.15.1") {
8+
utils::globalVariables(c(
9+
".",
10+
"pd", "pd_nested", "pd_flat", "flattened_pd",
11+
"line1", "line2", "col1", "col2",
12+
"terminal", "text", "short",
13+
"spaces", "lag_spaces",
14+
"newlines", "lag_newlines",
15+
NULL
16+
))
17+
}

man/create_node_from_nested_root.Rd

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

tests/testthat/public-api/xyzpackage/.Rbuildignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/testthat/public-api/xyzpackage/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)