>
>
PVS-Studio 7.31: new C++ analyzer featu…

Gleb Aslamov
Articles: 13

PVS-Studio 7.31: new C++ analyzer features, enhanced user annotations, and more

PVS-Studio 7.31 has been released. We have so much news to share with you! We've enhanced the user annotation system, the mode to analyze individual files, and much more! Learn more release details here.

You can download the latest version of PVS‑Studio here.

Enhanced individual file analysis mode

We've enhanced the mode to analyze individual files via the ‑‑source-files flag in the pvs-studio-analyzer utility.

If you want to know more about the analysis flags, check out it here.

We've improved the handling of scenarios in which the compilation dependency cache for C and C++ files differs from the project structure.

This could happen if you often switch branches in one workspace or analyze different project versions.

If you want to learn more about this mode, check out the documentation.

New feature to customize configuration files

The PVS-Studio for C++ now supports setting up the .pvsconfig configuration files based on the analyzer version that uses these files.

If you want to learn more, check out the documentation.

Enhanced user annotation system

The system of user annotations in C++ analyzer now supports setting the constraints of allowed and disallowed values for integer function parameters.

If you want to learn more about the system of user annotations, check out the documentation.

Enhanced CircleCI documentation

We've enhanced and updated the documentation on the PVS-Studio integration into the CircleCI cloud CI system.

You can find the enhanced documentation here.

New diagnostic rules

C, C++

  • V1108. Constraint specified in a custom function annotation on the parameter is violated.
  • V1109. Function is deprecated. Consider switching to an equivalent newer function.
  • V1110. Constructor of a class inherited from 'QObject' does not use a pointer to a parent object.

C#

  • V3199. Index from end operator used with the value that is less than or equal to zero. Index is out of bound.
  • V3200. Possible overflow. The expression will be evaluated before casting. Consider casting one of the operands instead.

Java

  • V6113. Suspicious division. Absolute value of the left operand is less than the value of the right operand.
  • V6114. The 'A' class containing Closeable members does not release the resources that the field is holding.

Articles

For C++ programmers:

For C# programmers:

For Java programmers:

Articles on general topics:

New videos

We've also got a new series of videos about Andrey Karpov's mini-book "60 terrible tips for a C++ developer"!

If you can't wait to dive into the rest of the terrible tips, you can read the full version on our blog.

If you want to write efficient, reliable and well-structured C++ programs, it's helpful to know about errors and inefficient approaches. Now in video format:

Do you want to check a project with PVS-Studio? Then start from this page.

If you would like to get news on latest releases, subscribe to the PVS-Studio newsletter here.