# Parasoft C/C++test

> **TL;DR**
> OS: Windows, Linux

You can run Parasoft C/C++test static analysis on your project directly from CLion by configuring it as an [external tool](configuring-third-party-tools.html), and then review the findings with the built-in [SARIF Viewer](sarif-viewer-report.html).

CLion calls the C/C++test command-line launcher (`cpptestcli`), which reads the compilation database that CLion generates (`compile_commands.json`) and writes a report into your project.

## Prerequisites

* Parasoft C/C++test is installed on your machine, and you know the path to the `cpptestcli` launcher (for example, `/home/<user>/parasoft/cpptest/cpptestcli`). For installation and license activation instructions, see the [Parasoft C/C++test installation guide](https://docs.parasoft.com/display/CPPTEST20261/Installation+Guide).

* A C/C++test settings file in your project (for example, `cpptest.localsettings.properties`) that accepts the EULA, provides the license, and lists the report formats. To use the SARIF Viewer, include `sarif` in the report formats: ```PROPERTIES report.format=html,xml,sarif report.location=./reports ```

## Configure the external tools

Define one external tool per analysis scope, for example, one for single-file analysis, and another for project-wide analysis

Procedure:

1. Open `Settings | Tools | External Tools`.

![External tools settings](https://resources.jetbrains.com/help/img/idea/2026.2/cl_parasoft_external_tools.png)

2. Click Add (`+`).

3. Fill in the required fields, then click OK.

![Tool settings](https://resources.jetbrains.com/help/img/idea/2026.2/cl_parasoft_tool_example.png)

### Arguments

Here is an example of arguments for single-file analysis:

```PLAINTEXT
-settings
"$ProjectFileDir$/cpptest.localsettings.properties"
-compiler
gcc_13-aarch64
-config
"builtin://Modern C++ (11, 14 and 17)"
-input
$CMakeCurrentBuildDir$/compile_commands.json
-resource
$FilePath$
```

* `-settings` — your local configuration file with a license and report formats.

* `-compiler` — the compiler configuration id that matches your toolchain.

* `-config` — the test configuration. You can use a built-in configuration, as shown, or point to a `.properties` file, like `"$ProjectFileDir$/[rules].properties"`. In the example above, the built-in configuration is the Parasoft built-in configuration for the Modern C++. If your license contains the MISRA C++ 2023 rules, for example, the configuration is `-config "builtin://MISRA C++ 2023"`.

* `-input` — the compilation database, so cpptestcli knows the exact flags or includes used to build each file.

* `-resource` — the scope that restricts analysis to the current file. You do not need this argument for project-wide analysis because the project level is the default scope for cpptestcli.

> **Note:**
> Arguments that contain spaces, such as the path to a configuration file with spaces in its name, must be quoted, and a comma-separated list like `report.format` must not contain spaces (`html,xml,sarif`, not `html, xml, sarif`).

## Run the analysis

To run the analysis, select `Tools | External Tools | <tool name>` from the main menu.

![Run analysis](https://resources.jetbrains.com/help/img/idea/2026.2/cl_parasoft_run_tool.png)

The launcher output appears in the `Run` tool window.

![Analysis output](https://resources.jetbrains.com/help/img/idea/2026.2/report.sarif` file. The findings open in the `Problems` tool window, on the SARIF Results tab, grouped by tool and rule. Each result shows the rule message and its source location.

![SARIF Results window](https://resources.jetbrains.com/help/img/idea/2026.2/cl_parasoft_sarif_viewer.png)

To open the code for a finding, double-click it, press `Enter`, or select Jump to Source from the context menu.

![Jump to source](https://resources.jetbrains.com/help/img/idea/2026.2/cl_parasoft_sarif_jump_to_source.png)

CLion remembers imported report paths and reloads them when you reopen the project.

For details, see [SARIF Viewer](sarif-viewer-report.html).

