A testthat
version for detecting vulnerabilities.
This function is used within the testthat
framework.
As testthat strips out the repositories from options,
we have to set the value locally in the function, i.e. the
value you have in getOption("repos")
is not used.
expect_secure(pkg, repo = "https://cran.rstudio.com", verbose = FALSE)
pkg | The pkg to check |
---|---|
repo | The CRAN repository, used to get version numbers |
verbose | Default |
An important proviso is that we are only testing packages for specific versions.
By default, this will be the latest version on CRAN.
This may differ for users or if you are using a CRAN snapshot.
For the latter, simply change the repo
parameter.
if (FALSE) { # Typically used inside testthat oysteR::expect_secure("oysteR") }