Skip to contents

Flags library() / require() in package code, which alters the user's search path. Code destined for a parallel worker is exempt, since a daemon starts with an empty search path.

Usage

diagnose_library_in_pkg_code(path, verbose = TRUE, parsed = NULL)

Arguments

path

Character. Path to the package directory. Default: ".".

verbose

Logical. Print diagnostic output. Default: TRUE.

parsed

Optional pre-parsed source, as returned internally by the orchestrator. Defaults to parsing path afresh.

Value

checktor_check_result() with passed, issues, message.

See also

checktor(), which runs this and every other check.

Examples

pkg <- example_diagnose_scenario("code_examples/tf_usage_bad.R",
                                 show_content = FALSE)
diagnose_library_in_pkg_code(pkg, verbose = FALSE)$passed
#> [1] TRUE