Daniel Savu
Daniel Savu

Reputation: 11

PVS Studio analysis

I have a project at university where i need to make a static analysis on a project using any tool . I chose this project written in C++: https://github.com/AndreaOrru/LaiNES and PVS Studio tool (on linux). But, i have a problem. This project doesn't have a make or cmake file.. this project have a Sconstruct file .
It's posibile somehow to make analysis with pvs ? If it's not posible , what other tool should i use ?

Upvotes: 1

Views: 369

Answers (1)

A. Govorov
A. Govorov

Reputation: 31

According to PVS-Studio docs, you can capture compiler invocations via pvs-studio-analyzer trace:

cd /path/to/LaiNES pvs-studio-analyzer trace -- scons

After that, you can analyze the project and generate a "raw" log:

pvs-studio-analyzer analyze -o /path/to/project.log -jN

Then, convert the "raw" log into some format proper for you (e.g., QtCreator tasklist):

plog-converter -a GA:1,2 -t tasklist -o /path/to/project.tasks /path/to/project.log

Make sure that you've added special comments in LaiNES' compilation units before starting the analysis to use PVS-Studio free.

Upvotes: 3

Related Questions