Skip to content

Commit edfa1de

Browse files
author
smeyer
committed
--as-cran enables _R_CHECK_PACKAGES_USED_IN_DEMO_
git-svn-id: https://svn.r-project.org/R/trunk@88013 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent bdf3150 commit edfa1de

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

doc/NEWS.Rd

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,11 @@
580580
\command{autoconf}-generated \command{configure} scripts.
581581

582582
\item \command{R CMD check} gains option \option{--run-demo} to
583-
check demo scripts analogously to tests.
583+
check demo scripts analogously to tests. This includes a check
584+
for undeclared package dependencies: it can also be enabled
585+
separately by setting the environment variable
586+
\env{_R_CHECK_PACKAGES_USED_IN_DEMO_} to a true value
587+
(as done by \command{R CMD check --as-cran}).
584588

585589
\item \code{R CMD build} now supports \option{--compression=zstd}
586590
on platforms with sufficient support for \command{zstd}.

doc/manual/R-ints.texi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4264,7 +4264,8 @@ Default: false (but true for CRAN submission checks).
42644264
@item _R_CHECK_PACKAGES_USED_IN_DEMO_
42654265
Control whether R scripts in the @file{demo} directory should be checked
42664266
for packages used but not declared in the @file{DESCRIPTION} file.
4267-
Default: false unless command-line option @option{--run-demo} is specified.
4267+
Default: false unless command-line option @option{--run-demo} is
4268+
specified (but true for CRAN submission checks).
42684269

42694270
@item _R_CHECK_SHLIB_OPENMP_FLAGS_
42704271
Check correct and portable use of @code{SHLIB_OPENMP_*FLAGS} in
@@ -4637,6 +4638,7 @@ _R_CHECK_UNDOC_USE_ALL_NAMES_=true
46374638
_R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_=true
46384639
_R_CHECK_RD_NOTE_LOST_BRACES_=true
46394640
_R_CHECK_XREFS_NOTE_MISSING_PACKAGE_ANCHORS_=true
4641+
_R_CHECK_PACKAGES_USED_IN_DEMO_=true
46404642
@end example
46414643

46424644
@noindent

src/library/tools/R/check.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7415,6 +7415,7 @@ add_dummies <- function(dir, Log)
74157415
## Sys.setenv("_R_USE_STRICT_R_HEADERS_" = "TRUE")
74167416
Sys.setenv("_R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_" = "TRUE")
74177417
Sys.setenv("_R_CHECK_XREFS_NOTE_MISSING_PACKAGE_ANCHORS_" = "TRUE")
7418+
Sys.setenv("_R_CHECK_PACKAGES_USED_IN_DEMO_" = "TRUE")
74187419
R_check_vc_dirs <- TRUE
74197420
R_check_executables_exclusions <- FALSE
74207421
R_check_doc_sizes2 <- TRUE

0 commit comments

Comments
 (0)