## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = FALSE
)

## ----setup--------------------------------------------------------------------
# library(checkhelper)

## -----------------------------------------------------------------------------
# # Store the check outputs in a directory you can browse afterwards.
# check_output <- tempfile("example")
# 
# # `Ncpus = 1` matches CRAN's incoming-pretest. Bump it on a multi-core
# # host (e.g. `Ncpus = parallel::detectCores() - 1`) when you just need
# # a fast pre-flight rather than a faithful CRAN reproduction.
# audit_check(pkg = ".", check_output = check_output, Ncpus = 1)
# 
# # Open the directory with all outputs (logs, install, tests).
# utils::browseURL(check_output)

## -----------------------------------------------------------------------------
# res <- check_n_covr(".")
# res$check                                # CRAN errors / warnings / notes
# covr::percent_coverage(res$coverage)     # global percentage

## -----------------------------------------------------------------------------
# leaks <- audit_userspace(pkg = ".")
# leaks

