% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_covr_skip_dt_nstf.R
\name{dt_compute_untested_functions}
\alias{dt_compute_untested_functions}
\title{Compute untested functions from coverage using srcref spans (internal)}
\usage{
dt_compute_untested_functions(pkg_name, coverage)
}
\arguments{
\item{pkg_name}{character(1). The package name whose namespace is inspected
for functions (\code{asNamespace(pkg_name)}).}

\item{coverage}{A coverage object as returned by \code{covr} (e.g.,
\code{covr::environment_coverage()} or \code{covr::package_coverage()}),
consumable by \code{covr::tally_coverage()}.}
}
\value{
\link[base:data.frame]{data.frame} with one row per untested function
  and columns:
  \describe{
    \item{function_name}{Function symbol in the package namespace.}
    \item{file}{Absolute, normalized path to the source file containing the function.}
    \item{start_line}{Start line (inclusive) from the function's \code{srcref}.}
    \item{end_line}{End line (inclusive) from the function's \code{srcref}.}
  }
  Returns an empty data.frame with these columns if (a) the coverage table is
  empty, (b) no functions have an \code{srcref}, or (c) all functions had at
  least one executed line within their span.
}
\description{
Identifies package functions that were not executed by the provided coverage
object. A function is considered \emph{untested} if \strong{no} line within
its \code{srcref} span (from \code{start_line} to \code{end_line}) has a
positive execution count in \code{covr::tally_coverage()}.
}
\section{Details}{

\itemize{
  \item Functions without an \code{srcref} are skipped.
  \item Files are matched by \emph{basename} between the coverage table and the
        function’s \code{srcref} source path to make the join resilient to
        differing absolute paths in temporary build trees.
  \item A line is considered executed when its coverage \code{value} is a finite
        number greater than zero.
}
}

\seealso{
\code{\link[covr]{tally_coverage}}
}
\keyword{internal}
