Bachelor Thesis BCLR-2020-106

BibliographyPrölß, Till: Communication and Generic Interfaces between IDEs and Static Analysis Tools.
University of Stuttgart, Faculty of Computer Science, Electrical Engineering, and Information Technology, Bachelor Thesis No. 106 (2020).
31 pages, english.
Abstract

This paper explores the concept of a generic connection between a static analysis tool and an IDE, so that the analysis results are displayed directly in the IDE and the user can interact with them. Currently, most static analysis tools can only be run manually from the command line, in a pipeline or have a custom plugin to communicate with the IDE. These custom plugins are complicated and they need to be custom made for each IDE, even though the functionality of them is largely identical. The aim of this thesis was to find or create a simple method or generic interface to provide this connection between IDE and analysis tool, while minimizing the needed work for each plugin. To achieve this, authors made use of the language server protocol (LSP), which is an already existing and widely supported protocol that allows language servers to connect to an IDE. As static analysis tools and language server work largely identically, it’s possible to use the LSP for most of the needed functionality. Only interaction with the analysis results is not directly covered by the LSP and instead is resolved through an idependent web application running in a webview of the IDE. The result is a simple example program that couples the CheckStyle analysis program to the VSCode IDE. It shows all analysis results directly in the source code and allows the user to interact with each finding through an html/javascript page, which runs directly in a webview in the IDE. The server and web application part of the solution can be reused between any IDE with slight modification and only the plugin has to be rewritten as long as said IDE supports webviews or other methods to display html code and execute javascript. Another option to display this web application in an external browser or user interface has also been discussed but not implemented. In conclusion, the methods described in this paper can be used to connect any static analysis tool to an IDE, allow interaction with analysis results and adapt to different IDEs with relatively little effort.

Department(s)University of Stuttgart, Institute of Software Technology, Empirical Software Engineering
Superviser(s)Wagner, Prof. Stefan; Ghatta, Sara
Entry dateApril 29, 2021
   Publ. Computer Science