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
STRING ARRAY eventmasksEvent masks for invalidation of this validation result
RECORD ARRAY messagesList of errors, warnings and hints
INTEGER messages.colColumn number for this message
INTEGER messages.lineLine number for this message
STRING messages.messageMessage
RECORD messages.metadatametadata (only when source != "unknown")
STRING messages.resourcenameResource name for this message
STRING messages.sourceSource for this message
STRING messages.type"error", "warning" or "hint"
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