>
>
PVS-Studio Reports Now in Html

Sviatoslav Razmyslov
Articles: 90

PVS-Studio Reports Now in Html

PVS-Studio analyzer has long provided Html format for reports, but it was so limited that you could use it only for viewing small reports, for example, sent by email. In this post, I will tell you how we have reworked it and what new capabilities it offers now.

Introduction

One of the secondary popular ways to control code quality is to view project analysis reports remotely on a server in a web browser. Keeping this in mind, we added a second version of Html-reports to PVS-Studio, under the name FullHtml. As an alternative to the first version (simple Html), the new format opens up other ways of handling reports. Read on to find out when each of the two types is preferable.

Viewing reports in a web browser

FullHtml is a full-fledged report format for viewing analysis results. It allows you to search for and sort messages by type, file, level, code, and warning text. What makes it special is that it allows you to navigate faulty fragments in the source files pointed out by the analyzer. The reported source files themselves are copied to Html and become part of the report. An example of this type of report is shown in Figures 1-2.

Figure 1 – Main page of an Html-report

Figure 2 – Viewing warnings in the source code

Such a report can be conveniently sent as an archive via email or shared with other developers over the LAN using any web server such as Lighttpd and the like.

Viewing reports in a mail client

Html is a light report format consisting of one .html file. It contains brief information about the issued warnings and is good for sending via email. An example of this type of report is shown in Figure 3.

Figure 3 – Simple Html report

Conclusion

While Html-reports can be very useful for certain uses of the analyzer, they are not designed for customization and filtering of analysis results. To do that, you have to configure all the settings either in the analyzer itself (like excluding a library folder from analysis) or in the report converter (like choosing diagnostic types, warning levels, etc.).

To see how FullHtml really looks like, I converted in this format one of the latest reports, which I've used when writing the article about the MuseScore project: MuseScoreHtml.7z.