Nobody likes to kick off a bunch of jobs only to find after returning from lunch that they all failed within minutes due to a syntax error in the script. Missing bracket, schmacket.
The good news is that WDL comes with a utility toolkit called wdltool that includes a syntax validation function. Instructions for getting and running the
wdltool executable are here (but don't worry about it now -- we'll give you that link again when it's time to install everything you need).
To validate our WDL syntax, we simply call the
validate function on our script:
$ java -jar wdltool.jar validate myWorkflow.wdl
This function parses the WDL script and alerts us to any syntax errors such missing curly braces, undefined variables, missing commas and so on. It will resolve imports, but note that it is not able to identify errors like typos in commands, specifying the wrong filename, or failing to provide required inputs to the programs that are run in the workflow.
$ java -jar wdltool.jar validate myWorkflow.wdl ERROR: Call references a task (BADps) that doesn't exist (line 22, col 8) call BADps ^