check_package {cleanr} | R Documentation |
Check a Package
Description
Run check_file
on a package's source.
Usage
check_package(path, pattern = "\\.[rR]$", ...)
Arguments
path |
Path to the package to be checked. |
pattern |
A pattern to search files with, see |
... |
Arguments to be passed to |
Details
The function catches the messages of "cleanr"-conditions
throw
n by check_file
and, if it caught any,
throw
s them.
Value
Invisibly
TRUE
,
but see Details.
See Also
Other wrappers:
check_directory()
,
check_file_layout()
,
check_file()
,
check_function_layout()
,
check_functions_in_file()
Examples
# create a fake package first:
package_path <- file.path(tempdir(), "fake")
usethis::create_package(package_path, fields = NULL,
rstudio = FALSE, open = FALSE)
directory <- system.file("runit_tests", "source", "R_s4",
package = "cleanr")
file.copy(list.files(directory, full.names = TRUE), file.path(package_path,
"R"))
RUnit::checkTrue(cleanr::check_package(package_path, check_return = FALSE))
[Package cleanr version 1.4.0 Index]