Install the extension for Visual Studio Code
This section explains how to install the Perforce Static Analysis extension for Visual Studio Code on Windows.
The plugin is server version agnostic. Install a new version of the plugin by downloading a new version of the Klocwork Desktop tools package while keeping your server at an earlier version, to support newer versions of Visual Studio Code and take advantage of certain bug fixes.
-
Download the package using one of the following options:
-
In Validate, click Resources. Under Downloads, download and unzip the
kw-desktop-toolspackage. -
Log into the Customer Support Portal with your user ID and password or register as a new user. Download and unzip the
kw-desktop-toolspackage.
-
- In Visual Studio Code, click View > Extensions.
- In the Extensions panel, click ... > Install from VSIX....
- Navigate to the VSIX file that you downloaded (for example,
p4savscodeextension.vsix) and select Install. - In the Extensions panel, click Refresh. The extension now appears in your Extensions panel.
-
Right-click the Perforce Static Analysis extension, then click Extension Settings.
-
To enable the Klocwork panel, under the Perforce Static Analysis: Active Tool Selection list, click Klocwork.
The Klocwork panel is now visible and all Klocwork commands are available.