-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into use-raw-strings
- Loading branch information
Showing
30 changed files
with
246 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,6 @@ call( | |
) | ||
|
||
|
||
|
||
# if all col1 arguments are named, col1 must also be aligned | ||
# not aligned | ||
fell( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ if (value > 0) { | |
} | ||
|
||
|
||
|
||
if (value > 0) { | ||
print(value) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,6 @@ call( | |
2, | ||
|
||
|
||
|
||
# comment | ||
|
||
1, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ switch( # | |
) | ||
|
||
|
||
|
||
switch(x, | ||
a = 2, # | ||
y = 3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ call(call( | |
)) | ||
|
||
|
||
|
||
# no more barcket on same line -> | ||
call(call( | ||
3, 4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
1 + 1 | ||
} | ||
|
||
|
||
|
||
|
||
|
||
### some comment | ||
|
||
|
||
|
||
|
||
{ | ||
NULL | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
1 + 1 | ||
} | ||
|
||
|
||
### some comment | ||
|
||
|
||
{ | ||
NULL | ||
} |
20 changes: 20 additions & 0 deletions
20
tests/testthat/line_breaks_top_level_exprs/conditionals-in.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
for (i in 1:10) {} | ||
|
||
|
||
|
||
|
||
|
||
|
||
# some comment | ||
|
||
|
||
|
||
|
||
|
||
while (TRUE) {} | ||
|
||
|
||
|
||
|
||
# some comment | ||
if (TRUE) NULL |
11 changes: 11 additions & 0 deletions
11
tests/testthat/line_breaks_top_level_exprs/conditionals-out.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
for (i in 1:10) {} | ||
|
||
|
||
# some comment | ||
|
||
|
||
while (TRUE) {} | ||
|
||
|
||
# some comment | ||
if (TRUE) NULL |
23 changes: 23 additions & 0 deletions
23
tests/testthat/line_breaks_top_level_exprs/function_defs_and_calls-in.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
f <- function() NULL | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
g <- function() NULL | ||
|
||
|
||
|
||
|
||
f() | ||
|
||
# comment | ||
|
||
|
||
|
||
|
||
|
||
g() |
12 changes: 12 additions & 0 deletions
12
tests/testthat/line_breaks_top_level_exprs/function_defs_and_calls-out.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
f <- function() NULL | ||
|
||
|
||
g <- function() NULL | ||
|
||
|
||
f() | ||
|
||
# comment | ||
|
||
|
||
g() |
23 changes: 23 additions & 0 deletions
23
tests/testthat/line_breaks_top_level_exprs/non_strict-in.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
f <- function() NULL | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
g <- function() NULL | ||
|
||
|
||
|
||
|
||
f() | ||
|
||
# comment | ||
|
||
|
||
|
||
|
||
|
||
g() |
23 changes: 23 additions & 0 deletions
23
tests/testthat/line_breaks_top_level_exprs/non_strict-out.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
f <- function() NULL | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
g <- function() NULL | ||
|
||
|
||
|
||
|
||
f() | ||
|
||
# comment | ||
|
||
|
||
|
||
|
||
|
||
g() |
21 changes: 21 additions & 0 deletions
21
tests/testthat/line_breaks_top_level_exprs/piped_chains-in.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
|
||
f %>% g() | ||
|
||
|
||
|
||
|
||
|
||
|
||
h %>% i() | ||
|
||
|
||
|
||
|
||
|
||
# some comment | ||
|
||
|
||
|
||
|
||
j %>% k() |
10 changes: 10 additions & 0 deletions
10
tests/testthat/line_breaks_top_level_exprs/piped_chains-out.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
f %>% g() | ||
|
||
|
||
h %>% i() | ||
|
||
|
||
# some comment | ||
|
||
|
||
j %>% k() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,6 @@ call( | |
# new comment | ||
|
||
|
||
|
||
|
||
a() | ||
# I think it gets boring | ||
# new_line here | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,6 @@ | |
#' # two | ||
#' | ||
#' | ||
#' | ||
#' | ||
#' ( | ||
#' # more | ||
#' a <- 3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ NULL | |
NULL | ||
|
||
|
||
|
||
#' this | ||
#' | ||
#' empty line after example | ||
|
16 changes: 16 additions & 0 deletions
16
tests/testthat/roxygen-examples-complete/30-multiple-empty-lines-between-in.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#' Empty line in examples | ||
#' | ||
#' @examples | ||
1 | ||
|
||
|
||
|
||
|
||
|
||
|
||
#' Empty line in examples | ||
#' | ||
#' @examples | ||
#' \dontrun{ | ||
#' } | ||
2 |
13 changes: 13 additions & 0 deletions
13
tests/testthat/roxygen-examples-complete/30-multiple-empty-lines-between-out.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#' Empty line in examples | ||
#' | ||
#' @examples | ||
1 | ||
|
||
|
||
#' Empty line in examples | ||
#' | ||
#' @examples | ||
#' \dontrun{ | ||
#' | ||
#' } | ||
2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
test_that("extra line breaks between conditional statements are removed", { | ||
expect_no_warning( | ||
test_collection("line_breaks_top_level_exprs", "conditionals", transformer = style_text) | ||
) | ||
}) | ||
|
||
test_that("extra line breaks between function and definitions and calls are removed", { | ||
expect_no_warning( | ||
test_collection("line_breaks_top_level_exprs", "function_defs_and_calls", transformer = style_text) | ||
) | ||
}) | ||
|
||
test_that("extra line breaks between piped chains are removed", { | ||
expect_no_warning( | ||
test_collection("line_breaks_top_level_exprs", "piped_chains", transformer = style_text) | ||
) | ||
}) | ||
|
||
test_that("extra line breaks between braced expressions are removed", { | ||
expect_no_warning( | ||
test_collection("line_breaks_top_level_exprs", "braces", transformer = style_text) | ||
) | ||
}) | ||
|
||
test_that("extra line breaks are not removed in non-strict mode", { | ||
expect_no_warning( | ||
test_collection("line_breaks_top_level_exprs", "non_strict", transformer = style_text, strict = FALSE) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# NB: DO NOT EDIT. Auto-generated by ./tests/dev/generate_roxygen_tests.R. | ||
|
||
test_that("analogous to test-roxygen-examples-complete: 30", { | ||
expect_warning(test_collection("roxygen-examples-complete", "^30-", transformer = style_text), NA) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ d | |
'text with "quotes"' | ||
|
||
|
||
|
||
# adding brackets in pipes | ||
a %>% | ||
b() %>% | ||
|