Check syntax of all templates in build script

Issue #304 new
Jesper Öqvist created an issue

If there is a syntax error in any template, it will lead to runtime warning and potentially errors in code generation.

We could catch these errors earlier if we had a tool to check the syntax of all template files in the build script. This could be done with e.g. a Gradle plugin.

Here is an example of a typical problem caused by a syntax error in a template:

WARNING: Could not load template file incremental/Collections
Syntax error at line 63: missing $endif
org.jastadd.tinytemplate.TemplateExpansionWarning: Template expansion warning: while expanding template 'CollDecl.surveyMethod': unknown template 'CollDecl.incHookCollectionSurveyHandler'

The unknown template error is caused by failure to parse a template file with syntax errors.

Comments (1)

  1. Log in to comment