Quick start of PVS-Studio on Windows
- How to enter license
- How to run analysis
This guide will help you start a project analysis on Windows quickly. The page does not list all of the analyzer features. If you would like to learn about all the features, please consult the full documentation.
On Windows, PVS-Studio integrates into Visual Studio, VS Code, Qt Creator, CLion, and Rider as a plugin. They provide a user-friendly interface for working with the analyzer. There is also an IDE-independent C and C++ Compiler Monitoring UI application that greatly expands the list of supported compilers. The PVS-Studio_Cmd.exe console utility makes it possible to check MSBuild projects without running the IDE or Compiler Monitoring UI. This enables you, for example, to use the analyzer as a part of the CI process.
After downloading the PVS-Studio installation package, you can start installing the program.
After confirming the license agreement, you see the options for integrating PVS-Studio into supported development environments. Integration options that are not available on the current system will not be active. If multiple versions of the same or different IDEs are installed on the machine, you can integrate the analyzer into all of them.
How to enter license
Once the components are installed, you are asked to enter a license or request a trial. To learn more about PVS-Studio, you may request a license by selecting I don't have PVS-Studio license or use the form.
A special documentation describes all options for entering the user license. Please, take a look at it.
How to run analysis
How to run C, C++, C# analysis in CLI
PVS-Studio_Cmd.exe is a utility that enables you to analyze Visual Studio (.sln) solutions as well as Visual C++ and Visual C# projects (.vcxproj, .csproj) from the command line. This documentation describes how to use the PVS-Studio_Cmd.exe utility.
By default, the Command line utility is installed in the following directory:
"C:\Program Files (x86)\PVS-Studio\"
The '--help' command displays all available analyzer arguments:
Here is an example of how to start the solution analysis from the PVS-Studio_Cmd.exe console application:
PVS-Studio_Cmd.exe -t "path/to/solution.sln" -o "path/to/analysislog.plog"
How to start Java project analysis
There are three main modes of running the Java analyzer:
- Integrating PVS-Studio Java into the Gradle build system
- Integrating PVS-Studio Java into the Maven build system
- How to work with the Java analyzer core from the command line
Integration into IDEs
Here are the links to the documentation on how to integrate PVS-Studio into various development environments as an extension:
How to use compilation monitoring
The CLMonitor utility seamlessly integrates the PVS-Studio static analysis into any build system on the Windows OS family. To compile files, the build system should use one of the preprocessors supported by the PVS-Studio.exe command-line analyzer (Visual C++, GCC, Clang, Keil MDK ARM Compiler 5/6, IAR C/C++ Compiler for ARM).
You can read more about it in the CLMonitor documentation.