expect_secure: Vulnerability Detection via Testthat

Description Usage Arguments Details Examples

View source: R/expect_secure.R

Description

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.

Usage

1
expect_secure(pkg, repo = "https://cran.rstudio.com", verbose = FALSE)

Arguments

pkg

The pkg to check

repo

The CRAN repository, used to get version numbers

verbose

Default TRUE.

Details

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.

Examples

1
2
3
4
5
## Not run: 
 # Typically used inside testthat
 oysteR::expect_secure("oysteR")

## End(Not run)

oysteR documentation built on Jan. 11, 2021, 1:36 a.m.

Related to expect_secure in oysteR...