ValidateSingleFile (open)
Validates a single file
Syntax
LOADLIB "mod::system/lib/validation.whlib";
RECORD FUNCTION ValidateSingleFile(STRING resourcename, RECORD options)
Parameters
STRING resourcename
resource to validate
RECORD options
Options
BOOLEAN documentation
Whether to validate documentation
STRING ARRAY eslintmasks
List of masks for files to validate with eslint
BOOLEAN nomissingtids
Whether to fail validation when any tids are missing
BOOLEAN nowarnings
Whether to fail validation when any warnings are found (does not necessarily include warnings added since 2024)
BOOLEAN onlytids
If TRUE, only scan and validate tids
BLOB overridedata
If present, use this data instead of the data from disk
BOOLEAN perfectcompile
Whether to fail validation when any harescript file has a warning
Return value
RECORD
Validation results
RECORD ARRAY errors
List of errors
INTEGER errors.col
Column number for this message
INTEGER errors.line
Line number for this message
STRING errors.message
Message
RECORD errors.metadata
metadata (only when source != "unknown")
STRING errors.resourcename
Resource name for this message
STRING errors.source
Source for this message
STRING ARRAY eventmasks
Event masks for invalidation of this validation result
RECORD ARRAY hints
List of hints
INTEGER hints.col
Column number for this message
INTEGER hints.line
Line number for this message
STRING hints.message
Message
RECORD hints.metadata
metadata (only when source != "unknown")
STRING hints.resourcename
Resource name for this message
STRING hints.source
Source for this message
RECORD ARRAY tids
List of tids
STRING tids.attrname
Attribute where this tid was defined
INTEGER tids.col
Column number for this message
INTEGER tids.line
Line number for this message
STRING tids.resourcename
Resource where this tid was defined
STRING tids.tid
Tid
RECORD ARRAY warnings
List of warnings
INTEGER warnings.col
Column number for this message
INTEGER warnings.line
Line number for this message
STRING warnings.message
Message
RECORD warnings.metadata
metadata (only when source != "unknown")
STRING warnings.resourcename
Resource name for this message
STRING warnings.source
Source for this message