check_namespace: Read a package NAMESPACE and check for dangerous imports

View source: R/check_namespace.R

check_namespaceR Documentation

Read a package NAMESPACE and check for dangerous imports

Description

Given a path to a package source tree, return a data.frame of Imports (both whole packages and fully qualified references).

Usage

check_namespace(pkg_path, imports_to_flag = dangerous_imports())

Arguments

pkg_path

path to package source tree

imports_to_flag

character vector of dangerous items to find

Examples

## Not run: 
check_namespace("../testevil")
check_namespace(
  "../testevil",
  dangerous_imports(additional_dangerous_imports = "sys::exec_background")
)

## End(Not run)

ropenscilabs/defender documentation built on May 11, 2022, 9:10 a.m.