What you want is a language consistency checker that can statically check for runtime errors.
To do this, you need a tool that can handle all languages ββ(you have two: Javascript? [For JQuery] with special links to HTML templates and HTML template templates (which is not exactly HTML). The tool should know that JavaScript code refers to templates using the name (presumably this is just a string, how do you know that the name of the template is not calculated by some secret process?), and that the links to the HTML template will link (if there is a slot for the template that is not referenced, this fine?)
The world is full of funny little languages ββand ridiculous restrictions within and between them (and its deterioration as people invent more and more DSL and integration rules). Your is unlikely to find a ready-made tool for each combination.
Our DMS Software Reengineering Toolkit is designed to easily accept new language descriptions or dialects (so that you can define a variant of the HTML template) and custom parsers (so that you can detect violations). [DMS already has stable traditional and non-traditional language interfaces , including JavaScript . DMS scales in several dimensions; one is the number of languages ββthat it can process at the same time ... for example, two, as in your case.
DMS allows you to code custom analyzers or transformers. Of course, no matter what analysis is performed, it obeys the limitations of computability; it is unlikely that if your template name is computed by a secret JavaScript code, then the tool will be able to determine that this computed name matches something in the templates.
Ira Baxter
source share