PVS-Studio 7.36 has been released. This version brings exciting updates, including extended MISRA support, a plugin for Qt Creator 16, enhanced user annotations in C#, and more! See more details in this note.
You can download the latest PVS-Studio version here.
Specifying the MISRA C & MISRA C++ standard versions
Now you can specify the version of MISRA C and MISRA C++ standards in PVS-Studio C and C++ analyzer. Just set it right in the PVS-Studio plugin for Visual Studio.
The supported standard versions include MISRA C 2012, MISRA C 2023, and MISRA C++ 2008.
Extended user annotation mechanism in C#
The C# analyzer now features an extended user annotation mechanism. Previously, user annotations were only available for taint analysis.
The analyzer provides a variety of annotations for taint analysis, allowing users to track taint sources and sinks. You can mark up methods or constructors that validate tainted data. Once the data is marked as validated, the analyzer will no longer issue warnings when the data reaches the sink.
Now, you can also mark up code with annotations that go beyond taint analysis. For example, you can indicate that a method can return null
, that its return value should be used, that an argument should not be -null
, and much more.
For more details, please consult the documentation.
Qt Creator 16.x plugin support
The PVS-Studio plugin is now available for Qt Creator 16.x. We've discontinued support for Qt Creator 10.x versions. We aim to maintain backward compatibility by supporting the latest plugin versions for all Qt Creator versions within two years of each release.
Learn more on how to use PVS-Studio in Qt Creator here.
Refinement: configuration file flags
‑‑apply-pvs-configs
flag for the cross-platform pvs-studio-analyzer
utility for analyzing C and C++ projects.This flag activates a mode for searching and applying the .pvsconfig
configuration files for analyzed source files. The configuration files are searched in the source file directory and its parent directories, up to the project root folder defined by the ‑‑project-root
flag.
For more details, please consult the documentation.
pvs-studio-analyzer
command line utility now includes the isolate-settings
mode for the ‑‑analysis-paths
flag.This mode isolates settings for the .pvsconfig
files within the specified directory. Only the settings in the specified directory are applied—any configurations in parent folders are skipped.
For more details, please consult the documentation.
This mode has also introduced settings for the .pvsconfig
file: //V_ANALYSIS_PATHS isolate-settings
and //V_ISOLATE_CURRENT_DIR
.
For more details, please consult the documentation section.
Breaking Changes
These changes aren't backward compatible with earlier versions of the analyzer. You may need to adjust the way you use the analyzer due to these changes.
compile_commands.json
in the pvs-studio-analyzer
command line utility, all non-compiler calls are now ignored. To work with compilers that have non-standard names and aren't automatically recognized by PVS-Studio, you can use the ‑‑compiler
flag. For more details, please consult the documentation.You can find the full list of changes on the PVS-Studio release history page.
New diagnostic rules
C, C++:
C#:
Java:
Articles
For those, who code in C++:
For those, who code in C#:
For those, who code in Java:
Other articles:
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.
0