Brussels / 3 & 4 February 2018

schedule

Graph-based analysis of JavaScript repositories

Incremental static analysis of JavaScript source code defined by declarative queries


Analyzing full JavaScript projects in real-time is hard. Writing maintainable and scalable tools is even harder. We'd like to provide instant feedback to the developers and our project presents a working prototype. The uniqueness of such a general framework consists of two rules: - make the analysis incremental: do not run the full check on every commit, but on the changed and affected parts we achieve incremental evaluation based on the ingraph engine - use declarative queries: the common visitor-collector pattern results in bad DX, complex plugins/plugin system and huge maintenance overhead as the project grows we use openCypher to query the AST and ASG, this keeps the analysis rules as simple as possible

Our tool parses the JS input with Shift Java, feeds the AST and ASG to Ingraph and upon a code change it evaluates the predefined queries. Developers working on a project usually change only one or two JS modules from the hundreds. While the static analysis query is defined to run through the whole project, ingraph ensures only the affected nodes are queried - the execution remains instant even with tens of millions of nodes.

Speakers

Photo of Adam Lippai Adam Lippai

Links