File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ Options:
1111
1212arguments <- precommit :: precommit_docopt(doc )
1313
14+ if (packageVersion(" roxygen2" ) < package_version(" 7.3.0" )) {
15+ rlang :: abort(" You need at least version 7.3.0 of {roxygen2} to run this hook." )
16+ }
17+
1418out <- lapply(arguments $ files , function (path ) {
1519 tryCatch(
1620 # Capture any messages from roxygen2:::warn_roxy()
Original file line number Diff line number Diff line change 1- # success - code evaluated
1+ # success - code not evaluated
22run_test(
33 " parsable-roxygen" ,
44 suffix = " -success.R" ,
5- std_out = " A random print statement " ,
5+ std_out = NULL ,
66 std_err = NULL ,
77 read_only = TRUE
88)
99
10- # success - code not evaluated
10+ # success - code evaluated
1111run_test(
1212 " parsable-roxygen" ,
1313 suffix = " -success.R" ,
14- cmd_args = " --no- eval" ,
15- std_out = NULL ,
14+ cmd_args = " --eval" ,
15+ std_out = " A random print statement " ,
1616 std_err = NULL ,
1717 read_only = TRUE
1818)
@@ -34,12 +34,3 @@ run_test(
3434 std_err = " unexpected '}'" ,
3535 read_only = TRUE
3636)
37-
38-
39- run_test(
40- " parsable-roxygen" ,
41- suffix = " -fail4.R" ,
42- std_out = " File " ,
43- std_err = " unexpected '}'" ,
44- read_only = TRUE
45- )
You can’t perform that action at this time.
0 commit comments