R/zzz.R

Defines functions .onLoad

.onLoad <- function(libname, pkgname) {
  op <- options()
  op.precommit <- list(
    precommit.executable = path_derive_precommit_exec(),
    precommit.block_install_hooks = FALSE,
    precommit.ci = "native"
  )
  toset <- !(names(op.precommit) %in% names(op))
  if (any(toset)) options(op.precommit[toset])
  if (interactive()) ensure_renv_precommit_compat()
  invisible()
}

# here is only used as a default argument, hence the R CMD check warning
# Namespace in Imports field not imported from
if (FALSE) {
  here::here()
}

Try the precommit package in your browser

Any scripts or data that you put into this service are public.

precommit documentation built on July 2, 2022, 1:06 a.m.