R/module-malformed.R
checkModuleMetadata.RdScans a module source file for common authoring mistakes that produce
cryptic R parse errors or surface only deep inside simInit(). Returns
a character vector of findings, or invisibly an empty vector if the file
looks clean.
checkModuleMetadata(file, stopOnFirst = FALSE)A character vector of findings (empty if none). When
stopOnFirst = TRUE and a problem is found, throws an error instead.
The detector set is intentionally modular: to add a new check, add an
entry to the internal .CC_MALFORMED_CHECKS registry — each entry is a
function (input) -> NULL | character(1).