% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module-malformed.R
\name{checkModuleMetadata}
\alias{checkModuleMetadata}
\title{Statically check a SpaDES module file for malformed metadata}
\usage{
checkModuleMetadata(file, stopOnFirst = FALSE)
}
\arguments{
\item{file}{Path to a module's main \code{.R} file.}

\item{stopOnFirst}{Logical. If \code{TRUE} (default), throw an error on the
first detector that fires. If \code{FALSE}, run every detector and return
the full vector of findings.}
}
\value{
A character vector of findings (empty if none). When
\code{stopOnFirst = TRUE} and a problem is found, throws an error instead.
}
\description{
Scans a module source file for common authoring mistakes that produce
cryptic R parse errors or surface only deep inside \code{simInit()}. Returns
a character vector of findings, or invisibly an empty vector if the file
looks clean.
}
\details{
The detector set is intentionally modular: to add a new check, add an
entry to the internal \code{.CC_MALFORMED_CHECKS} registry — each entry is a
function \code{(input) -> NULL | character(1)}.
}
