ValidateSingleFile (open)
Validates a single file
Syntax
LOADLIB "mod::system/lib/validation.whlib";
RECORD FUNCTION ValidateSingleFile(STRING resourcename, RECORD options)Parameters
STRING resourcenameresource to validate
RECORD optionsOptions
STRING ARRAY eslintmasksList of masks for files to validate with eslint
BOOLEAN nomissingtidsWhether to fail validation when any tids are missing
BOOLEAN nowarningsWhether to fail validation when any warnings are found (does not necessarily include warnings added since 2024)
BOOLEAN onlytidsIf TRUE, only scan and validate tids
BLOB overridedataIf present, use this data instead of the data from disk
BOOLEAN perfectcompileWhether to fail validation when any harescript file has a warning
Return value
RECORDValidation results
RECORD ARRAY errorsList of errors
INTEGER errors.colColumn number for this message
INTEGER errors.lineLine number for this message
STRING errors.messageMessage
RECORD errors.metadatametadata (only when source != "unknown")
STRING errors.resourcenameResource name for this message
STRING errors.sourceSource for this message
STRING ARRAY eventmasksEvent masks for invalidation of this validation result
RECORD ARRAY hintsList of hints
INTEGER hints.colColumn number for this message
INTEGER hints.lineLine number for this message
STRING hints.messageMessage
RECORD hints.metadatametadata (only when source != "unknown")
STRING hints.resourcenameResource name for this message
STRING hints.sourceSource for this message
RECORD ARRAY tidsList of tids
STRING tids.attrnameAttribute where this tid was defined
INTEGER tids.colColumn number for this message
INTEGER tids.lineLine number for this message
STRING tids.resourcenameResource where this tid was defined
STRING tids.tidTid
RECORD ARRAY warningsList of warnings
INTEGER warnings.colColumn number for this message
INTEGER warnings.lineLine number for this message
STRING warnings.messageMessage
RECORD warnings.metadatametadata (only when source != "unknown")
STRING warnings.resourcenameResource name for this message
STRING warnings.sourceSource for this message