C/C++test Standard can be integrated with JetBrains CLion, enabling users to run static analysis directly from the IDE. The integration is configured by adding C/C++test as an external tool in CLion.

Prerequisites:

Configuring Static Analysis for the Entire Project

  1. Start CLion and open the Settings dialog.
  2. Go to Tools > External Tools.
  3. Click + to add a new external tool configuration.
  4. Configure the tool using the following values:
  5. Click OK to save the configuration.

Configuring Static Analysis for a Single File

  1. In Settings > Tools > External Tools, click + to add another external tool configuration.
  2. Configure the tool using the following values:
  3. Click OK to save the configuration.

Configuration Notes

The following CLion macros are used in the external tool configurations:

Refer to the CLion documentation for more information about IDE macros and external tool configuration.

The C/C++test-specific parameters are:

Viewing Analysis Results

After static analysis is executed, C/C++test generates a SARIF report file in the specified report directory.

To view the results in CLion, double-click the SARIF report file. CLion opens the file in the SARIF Viewer, where you can inspect the reported static analysis findings.

Refer to the CLion documentation for more information about the SARIF Viewer.