% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BiocCheck.R
\name{BiocCheck}
\alias{BiocCheck}
\title{Check a package's adherence with the Bioconductor Package Guidelines}
\usage{
BiocCheck(
  package = getwd(),
  checkDir = dirname(package),
  debug = FALSE,
  callr = FALSE,
  ...
)
}
\arguments{
\item{package}{The path to an R package directory or tarball (\code{.tar.gz}).
The \code{BiocCheck} function is intended to be run from the package
directory; therefore, the current working directory (given by \code{getwd()})
is the default.}

\item{checkDir}{The directory where the \code{BiocCheck} output directory will be
stored. By default, it will be placed in the same directory as the package
directory i.e., \code{dirname(pkg_dir)}.}

\item{debug}{Whether to append the names of functions that correspond to
each condition raised by \code{BiocCheck} in the written log (i.e., in the
\code{'<package_name>.BiocCheck'} folder). This option is only relevant to
developers and contributors to \code{BiocCheck}.}

\item{callr}{logical(1) Whether to use the \code{callr} package to run \code{BiocCheck}
in an isolated R session to prevent namespace collisions.}

\item{\dots}{See the \code{dot-options} details section for available options.}
}
\value{
\code{BiocCheck()} is chiefly called for the side effect of the check
reporting. The function also creates a \verb{<package_name>.BiocCheck} folder
and returns a \code{BiocCheck} reference class with three main list elements:
\itemize{
\item \strong{error}: Items to address before the package can be accepted
\item \strong{warning}: Strongly suggested items that may require attention
\item \strong{note}: Items to consider, though not required, before acceptance
}
}
\description{
Analyzes an R package for adherence with Bioconductor package guidelines and
best practices. The check outputs are categorized into ERROR, WARNING, and
NOTE. See the vignette for more details. \code{BiocCheck} is complementary
to \verb{R CMD check}, which should always be run first.
}
\details{
\code{BiocCheck()} reviews R packages for adherence with Bioconductor
package guidelines and best practices. See
\url{https://contributions.bioconductor.org} for the latest guidance for
writing Bioconductor software. Some rationale behind these best practices
can be seen in the vignette and pages in the \code{references} section. The
vignette also provides detailed explanations of all the checks performed by
\code{BiocCheck}.

\code{BiocCheck} is called within R with \code{BiocCheck("package")}
where \code{package} points to the source directory or the \code{.tar.gz}
tarball that was created using \verb{R CMD build}.

\strong{Note} that \code{BiocCheck} is complementary to \verb{R CMD check}.
\verb{R CMD check} should always be run first for best results.

To skip installation of the package during the check, set the
\code{install} option to \code{FALSE} or \code{NULL}:

\if{html}{\out{<div class="sourceCode r">}}\preformatted{BiocCheck(package, install=FALSE)
## OR
BiocCheck(package, install=NULL)
}\if{html}{\out{</div>}}

To re-use an existing installation log file, set the \code{install} option
to the name of the installation log file.
For example, the following will put the \code{install_out.txt} log file in the
\verb{<package_name>.BiocCheck} directory:
\code{BiocCheck(package, install="check:install_out.txt")}
}
\section{dot-options}{

To use the dot-options, \code{BiocCheck} can be called with named arguments
corresponding to the options below. Typically, these options are set to
\code{TRUE} to disable specific checks, e.g.,
\code{BiocCheck(package, 'no-check-vignettes'=TRUE)}. Unless
otherwise stated, these options can be left unset (i.e., \code{NULL}) to enable
checks but \code{FALSE} can also be used to explicitly enable them. The available
options are:
\itemize{
\item \code{build-output-file}: file containing \verb{R CMD build} output, for
additional analysis
\item \code{new-package}:  enable checks specific to new packages
\item \code{no-check-bbs}: disable BBS-specific checks (for non-BioC packages).
Valid DESCRIPTION
\item \code{no-check-bioc-help}: disable check for registration on Bioconductor
\item \code{no-check-bioc-views}: disable biocViews-specific checks (for non-BioC
packages)
mailing list and support site
\item \code{no-check-coding-practices}: disable check for some common best coding
practices
\item \code{no-check-CRAN}:  disable check for if package exists in CRAN
\item \code{no-check-dependencies}:  disable check for bad dependencies
\item \code{no-check-deprecated}:  disable check for usage of deprecated packages
\item \code{no-check-description}:  disable DESCRIPTION file checks
\item \code{no-check-file-size}:  disable check for individual file size
\item \code{no-check-formatting}:  disable checks for file formatting
\item \verb{no-check-function-len}:  disable check for function length
\item \code{no-check-install-self}: disable check for require or library of
itself
\item \code{no-check-library-calls}: disable check usage of functions that
install or update packages
\item \code{no-check-man-doc}:  disable checks for man page documentation
\item \code{no-check-namespace}:  disable NAMESPACE file checks
\item \code{no-check-news}:  disable checks for NEWS file
\item \code{no-check-pkg-size}:  disable check for package tarball size
\item \code{no-check-R-ver}:  disable check for valid R version
\item \code{no-check-remotes}: disable check for usage of remote packages other
than those hosted on CRAN or Bioconductor
\item \code{no-check-skip-bioc-tests}: disable check for tests that skip when on
bioc
\item \code{no-check-unit-tests}:  disable checks for unit tests
\item \code{no-check-version-num}:  disable check for valid version number
\item \code{no-check-vignettes}:  disable vignette checks
\item \code{quit-with-status}:  enable exit code option when performing check
\item \code{install}: if \code{FALSE}, the package is not installed; otherwise, if not
specified, the package is installed by default. Optionally, a
\verb{check:<file>} key-value pair is provided to identify the name of the
installation output file which will be copied to the
\verb{<package_name>.BiocCheck} directory.
\item \code{libloc}: when \code{install} is specified, the library location where the
package is installed. By default, this is \code{.libPaths()[1]}.
}
}

\examples{

packageDir <- system.file("testpackages", "testpkg0", package="BiocCheck")
BiocCheck(packageDir, `quit-with-status`=FALSE)

}
\references{
\url{https://contributions.bioconductor.org}
}
\seealso{
\linkS4class{BiocCheck}, \linkS4class{Message}
}
\author{
Dan Tenenbaum, Lori Shepherd, and Marcel Ramos
}
