Skip to content

Commit

Permalink
check sanity of LazyData* fields
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@80113 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Mar 25, 2021
1 parent 65cb6c6 commit 3280ff0
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/library/tools/R/check.R
Original file line number Diff line number Diff line change
Expand Up @@ -2546,6 +2546,29 @@ add_dummies <- function(dir, Log)
} else resultLog(Log, "OK")
}

if(!is_base_pkg) {
desc <- .read_description("DESCRIPTION")
thislazy <- parse_description_field(desc, "LazyData", default = FALSE)
lazyz <- parse_description_field(desc, "LazyDataCompression",
default = "unknown")
lazyz <- !identical(lazyz, "unknown")
if(thislazy || lazyz) {
checkingLog(Log, "LazyData")
if (thislazy && !dir.exists("data")) {
noteLog(Log)
printLog0(Log,
" 'LazyData' is specified without a 'data' directory\n")
if(lazyz)
printLog0(Log,
" 'LazyDataCompression' is specified without a 'data' directory\n")
} else if (!thislazy && lazyz != "unknown") {
noteLog(Log)
printLog0(Log,
" 'LazyDataCompression' is specified without 'LazyData'\n")
}
}
}

## Check for ASCII and uncompressed/unoptimized saves in 'data'
if (!is_base_pkg && R_check_compact_data && dir.exists("data")) {
checkingLog(Log, "data for ASCII and uncompressed saves")
Expand All @@ -2570,7 +2593,7 @@ add_dummies <- function(dir, Log)
printLog0(Log, .format_lines_with_indent(out), "\n")
} else resultLog(Log, "OK")
}
}
}

check_doc_contents <- function()
{
Expand Down

0 comments on commit 3280ff0

Please sign in to comment.