Skip to contents

Walks \examples{} sections via tools::parse_Rd() and flags \dontrun{} subtrees that don't appear to have a justifying reason (interactive, network, credentials, long-running, etc.).

Usage

lab_example_structure(path, verbose = TRUE)

Arguments

path

Character. Path to package directory

verbose

Logical. Print diagnostic messages

Value

checktor_check_result() with passed, issues, message.

Source

The CRAN Cookbook covers this under Structuring of Examples. \dontrun{} should wrap only code that genuinely cannot run inside a check, a convention rather than a rule, which is why this sits at opinion tier. See vignette("check-sources", package = "checktor") for how every check maps to its source.

Examples

pkg_path <- example_diagnose_scenario("network_examples/bad_network_example.Rd",
                                      show_content = FALSE)
lab_example_structure(pkg_path, verbose = FALSE)
#>  Example structure check: PASSED