Static code analyser for Ubuntu

Guest

on 2 November 2016

Tags: viva64

This is a guest post by Ekaterina Milovidova, from viva64. If you would like to contribute a guest post, please contact ubuntu-devices@canonical.com

screen-shot-2016-11-02-at-10-32-41


Static code analysis is the process of detecting errors and flaws in the source code of programs. There is a large number of static analysis tools created for various programming languages that allow detecting a big number of errors on the development stage reducing the cost of development of the whole project.

The developers of PVS-Studio software, intended for bug detection in C, C++, and C# projects in Windows environment have released a new version for Linux systems that supports C/C++ compilers from GNU Compiler Collection (GCC) and LLVM Clang.

PVS-Studio detects potential errors of three main groups: general analysis, optimizations and 64-bit issues. The diagnostic set of general analysis allows detecting logic errors, typos, code fragments, causing access violation, incorrect usage of algorithms from STL libraries and a lot more.
The new version of PVS-Studio for GNU/Linux OS, in addition to the native version of the analyzer offers convenient variants of integration to the projects, using CMake and QMake and the display of the analysis results in the QtCreator and CLion IDE. Also there is now a possibility to check any project that uses one of the compilers, supported by the analyzer, with the help of the universal compilation tracking system.

For Ubuntu users, PVS-Studio developers have created Deb packages to install the analyzer and also deployed a custom repository for easy installation and updates. The analyzer can be downloaded as a deb/rpm or .tgz archive by the link here.

The code can be checked on the build server and on the machine of the developer. Developers recommend using both. In case the bug is found on the machine of the programmer before it got to the version control system, the analyzer is a real helper. You shouldn’t also forget about the check on the build server. Sometimes developers “miss” the analyzer warnings due to various reasons. Then regular overnight checks help to make sure that there are no bugs in the code.

Ubuntu desktop

Learn how the Ubuntu desktop operating system powers millions of PCs and laptops around the world.

Newsletter signup

Select topics you’re
interested in

In submitting this form, I confirm that I have read and agree to Canonical’s Privacy Notice and Privacy Policy.