% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/runner.R
\name{run_checks}
\alias{run_checks}
\title{Execute all active check programs}
\usage{
run_checks(cfg, state)
}
\arguments{
\item{cfg}{A named list of paths from \code{project_config.R}.}

\item{state}{The state object returned by \code{\link{setup_coregage}}.}
}
\value{
Updated \code{state} object with \code{issues} and
\code{summary_log} populated.
}
\description{
Loops through all active rule sets defined in the rule registry,
sources each check script from the appropriate folder
(trial checks from \code{cfg$trial_checks}, study checks from
\code{cfg$study_checks}), and calls \code{check_RULESET(state, cfg)},
where \code{RULESET} is the value from the \code{Rule_Set} column in
\code{rule_registry.xlsx}.
}
\examples{
\donttest{
tmp_rep <- tempdir()
cfg <- list(
  rule_registry = system.file("extdata", "rule_registry.xlsx",
                              package = "rCoreGage"),
  trial_checks  = tmp_rep,
  study_checks  = tmp_rep,
  inputs        = tmp_rep,
  reports       = tmp_rep,
  feedback      = tmp_rep
)
state          <- setup_coregage(cfg)
state$domains  <- load_inputs(cfg)
state          <- run_checks(cfg, state)
}
}
