check_package {cleanr} | R Documentation |
Run check_file
on a package's source.
check_package(path, pattern = "\\.[rR]$", ...)
path |
Path to the package to be checked. |
pattern |
A pattern to search files with, see |
... |
Arguments to be passed to |
The function catches the messages of "cleanr"-conditions
throw
n by check_file
and, if it caught any,
throw
s them.
Invisibly
TRUE
,
but see Details.
# 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))