% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/codecheck-api.R
\name{codeCheckModule}
\alias{codeCheckModule}
\title{Statically check a SpaDES module's source code (v2)}
\usage{
codeCheckModule(path, print = TRUE, enable = NULL, disable = NULL)
}
\arguments{
\item{path}{Path to a module directory (containing \verb{<modName>/<modName>.R},
and optionally an \verb{R/} subfolder of helper scripts) or to a single \code{.R}
file. If a directory, the module name is the directory's basename.}

\item{print}{Logical; print the grouped report. Default \code{TRUE}.}

\item{enable, disable}{Optional character vectors of rule IDs to restrict
the run. See \code{names(SpaDES.core:::.CC_RULES)} for the catalogue.}
}
\value{
A \code{data.frame} of findings (one row per problem). Returned
invisibly. Empty if the module is clean.
}
\description{
Walks the module's source via \code{xmlparsedata}, collects every reference to
\code{sim$x} / \code{sim[["x"]]} / \code{get("x", envir = envir(sim))} and to parameters
(\code{Par$x}, \code{P(sim)$x}, \code{params(sim)$mod$x}), then compares those uses to
the module's \code{defineModule()} metadata. Reports any mismatches as a
structured tibble of findings, optionally printed as grouped tables.
}
\details{
This is the v2 implementation, selectable at \code{simInit()} time via
\code{options(spades.codeCheckEngine = "v2")} (the default). The legacy v1
checker is still available via \code{options(spades.codeCheckEngine = "v1")}.
}
