> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Static analysis integrations

> Run Coverity, Parasoft C/C++test, Perforce QAC, cppcheck, or clang-tidy from chat for repeatable MISRA, CERT, and project-quality reports.

Use these workflows when you need a repeatable analysis of a whole project, such as MISRA or CERT evidence for a review. Inlay runs the analyzer you installed, checks that the intended sources were analyzed, and reports the findings together with any gaps.

For everyday diagnostics while you edit, see [LSP and static analyzers](/docs/core-concepts/static-analyzers.md).

The sections up to [Remediate findings](#remediate-findings) apply to every analyzer. The sections after it cover what each analyzer needs: [cppcheck and clang-tidy](#cppcheck-and-clang-tidy), [Coverity](#coverity), [Parasoft C/C++test](#parasoft-c%2Fc%2B%2Btest), and [Perforce QAC](#perforce-qac).

## Before you start

1. Install and license the analyzer on the machine that runs Inlay, and make its command-line tool available on `PATH`.

   | Analyzer | Command on `PATH` | Notes |
   | - | - | - |
   | Coverity | `coverity` | Local analysis needs the full client. A Thin Client can capture locally but analyzes only on Coverity Connect. To use the classic toolkit (`cov-configure`, `cov-build`, `cov-analyze`, `cov-format-errors`) instead, set **Command workflow** to **Classic toolkit**. |
   | Parasoft C/C++test | `cpptestcli` | C/C++test Standard 2026.1 is required. |
   | Perforce QAC | `qacli` | |
   | cppcheck | `cppcheck` | Open source. Provides MISRA C:2012 checks. |
   | clang-tidy | `clang-tidy` | Open source. Provides CERT checks. |

2. Enable the analyzer and open its settings. [Enable an analyzer](/docs/core-concepts/static-analyzers.md#enable-an-analyzer) has the steps for VS Code and the terminal UI. These analyzers are off by default. If you run a workflow with a disabled analyzer, Inlay asks before it enables it.

3. Set what your analyzer's section below lists. In VS Code, the analyzer's **Setup** list marks each item, such as a license or project setting, as **Ready**, **Needed**, or **To verify**.

4. Have the build ready. Analysis needs the same build inputs your firmware uses, such as a clean build command or a current `compile_commands.json`.

This page writes setting and option names as the terminal UI shows them. VS Code capitalizes each main word, for example **Test Configuration**, and uses its own names for the Perforce QAC settings. The [Perforce QAC](#perforce-qac) tables give both.

## Run an analysis

Run one of these commands in chat. Add instructions after the command to name the analyzer, standard, build, or scope.

| Command | Use it for |
| - | - |
| `/validate-MISRA` | MISRA analysis of the whole project. |
| `/validate-CERT` | CERT analysis of the whole project. |
| `/validate-coverity` | A controlled Coverity capture and analysis. |
| `/validate-parasoft` | A Parasoft C/C++test MISRA or CERT scan. |
| `/validate-qac` | The Perforce QAC workflow, from project setup to reports. |

For example:

```text theme={"theme":"css-variables"}
/validate-MISRA Use Perforce QAC with our release build. Report findings and
any files that could not be analyzed. Do not add suppressions or change source.
```

`/validate-MISRA` and `/validate-CERT` analyze the whole project unless you list paths after the command, for example `/validate-MISRA src/drivers`.

To choose the analyzer, Inlay uses the one you name. Otherwise it prefers an enabled analyzer that is ready for the standard: Perforce QAC when its project, license, and module are ready, or Parasoft C/C++test when it's ready with a licensed configuration for the standard. If neither is ready, `/validate-MISRA` uses cppcheck's MISRA checks and `/validate-CERT` uses clang-tidy's CERT checks, which [don't cover MISRA C++](#cppcheck-and-clang-tidy). Name Coverity to use that workflow.

Inlay asks before it changes shared settings, publishes results, adds suppressions, or excludes source.

## Read the result

Each report separates:

* the files and build configuration that were analyzed;
* setup errors, skipped files, and incomplete checks;
* automated findings, with exact counts by rule and file;
* requirements that need manual review;
* existing approved deviations or suppressions.

The MISRA and CERT reports open with the project, revision, and scope, followed by these status fields:

| Field | Value | Meaning |
| - | - | - |
| **Execution status** | `COMPLETE` | Every selected file was analyzed. |
| | `INCOMPLETE` | Some files failed or timed out, the analyzer failed, or no files were selected. Findings from completed files still count, but the run is not a clean result. |
| **Automated result** | `VIOLATIONS DETECTED` (MISRA) or `CERT-MAPPED FINDINGS DETECTED` (CERT) | The analyzer reported at least one finding for the standard. |
| | `NO VIOLATIONS DETECTED` (MISRA) or `NO CERT-MAPPED FINDINGS DETECTED` (CERT) | The configured checks reported nothing. This is not a compliance statement. |
| | `NOT DETERMINED` | The run was incomplete or couldn't run, and no violations were found. |
| **MISRA compliance claim** or **CERT conformance claim** | `NOT DETERMINED` | Always. An automated report doesn't make a compliance or conformance claim. |

The Coverity, Parasoft, and QAC reports use their own status values, such as `STOPPED` or `NOT RUN`, and explain them in the report.

A successful process exit is not enough. If capture was partial or a report is missing, Inlay marks the run incomplete instead of reporting a clean result.

> [!NOTE]
>
> Automated analysis supports a review. It does not establish MISRA compliance, CERT conformance, or certification by itself.

## Remediate findings

1. Choose a finding or module and ask for a focused fix.
2. Repeat the same analysis and the relevant tests.
3. Review any proposal to suppress a finding, exclude source, change shared rules, or publish results separately from the code fix.

## cppcheck and clang-tidy

`/validate-MISRA` uses cppcheck and `/validate-CERT` uses clang-tidy when you name the analyzer, or when neither Perforce QAC nor Parasoft C/C++test is ready.

| Analyzer | Checks | Build input to set | Report |
| - | - | - | - |
| cppcheck | MISRA C:2012. Needs cppcheck's MISRA addon. | **Compile database**: the path to `compile_commands.json`. | `.inlay/reports/MISRA-automated-analysis-report.md` |
| clang-tidy | The CERT checks that clang-tidy maps. | **Compile database directory**: the folder that contains `compile_commands.json`. Leave it empty to auto-detect. | `.inlay/reports/CERT-automated-analysis-report.md` |

Neither analyzer checks MISRA C++. For MISRA C++, use Perforce QAC, Parasoft C/C++test, or Coverity.

To run the MISRA workflow with cppcheck:

1. Install cppcheck with a working MISRA addon.
2. In `/static-analyzer`, enable cppcheck. See [Enable an analyzer](/docs/core-concepts/static-analyzers.md#enable-an-analyzer).
3. Set **Compile database** to the current `compile_commands.json`.
4. Ask for the run:

   ```text theme={"theme":"css-variables"}
   Use validate-MISRA with cppcheck for the whole non-vendored C and C++ project.
   Check the build inputs and scope first. Run the analysis and report findings,
   execution gaps, and requirements that still need manual review.
   ```

To run the CERT workflow with clang-tidy:

1. Install clang-tidy.
2. In `/static-analyzer`, enable clang-tidy.
3. Set **Compile database directory** to the folder that contains `compile_commands.json`.
4. Ask for the run:

   ```text theme={"theme":"css-variables"}
   Use validate-CERT with clang-tidy for the whole non-vendored C and C++ project.
   Check the inputs, run the CERT checks, and report findings and coverage gaps.
   ```

If the run didn't cover every file, the report says the execution is incomplete. These reports are automated analyzer evidence. They don't establish compliance with the standard on their own.

## Coverity

Run `/validate-coverity`. Name the coding standard when you need one, such as MISRA C, AUTOSAR C++14, or CERT C.

Provide:

* the source revision and build variant;
* the clean build command and compiler configuration;
* where results should go: local reports only, or Coverity Connect.

Set these in the Coverity settings when they apply to you:

| Setting | When to set it |
| - | - |
| **Local-analysis license** | Your license isn't installed in the Coverity `bin` directory. |
| **Analysis location** | You use a Thin Client. Choose **Connect Scan Service**. |
| **Result destination** | You want results on Coverity Connect. The default is **Local only**. |
| **Coverity Connect URL**, **Connect stream**, **Authentication key file** | You publish to Coverity Connect. |
| **Coding-standard configuration** | You have a reviewed coding-standard configuration file. |

Keep capture and analysis on the same source revision and tool version, and review the generated report before you rely on it. Local results go to `.inlay/reports/coverity` by default.

Inlay creates local reports first. It publishes to Coverity Connect only when you approve. For setup questions, run `/coverity-cli` or `/coverity-connect`. To run a coding-standard analysis directly, run `/coverity-compliance`.

## Parasoft C/C++test

Run `/validate-parasoft` and name the exact standard and edition. Inlay does not guess between editions. In the Parasoft settings, choose the matching **Test configuration**:

| Request | **Test configuration** |
| - | - |
| MISRA C:2023 (or MISRA C:2012 Amendment 4) | **MISRA C:2023 / C:2012 Amendment 4** |
| MISRA C:2025 | **MISRA C:2025** |
| MISRA C++:2023 | **MISRA C++:2023** |
| CERT C rules | **SEI CERT C Rules** |
| CERT C rules and recommendations | **SEI CERT C Guidelines** |
| CERT C++ rules | **SEI CERT C++ Rules** |

Your license must include the compliance pack for that configuration. Before the first run:

* Set **License source**. It starts as **Not configured**.
* Accept the Parasoft license agreement yourself by setting `parasoft.eula.accepted=true` in your C/C++test properties. Inlay never accepts it for you.
* Choose the **Input scope** that matches your project: **compile\_commands.json**, **Existing cpptest.bdf**, **Trace a clean build**, or **Single compile command**. Analysis of a single compile command covers only that file, and the report says so.

Reports go to `.inlay/reports/parasoft` by default. Inlay publishes to Parasoft DTP only when you approve.

The optional Parasoft C/C++test MCP server can look up rules and read existing reports. It does not replace running the analyzer. To set it up, run `/parasoft-cpptest-mcp`, or add it yourself as described in [Add your own server](/docs/integrations/mcp-servers.md#add-your-own-server).

## Perforce QAC

The QAC workflow has five stages. The first two give you local reports. The last three need a Perforce Validate server.

| Stage | What you do |
| - | - |
| 1. [Set up QAC](#set-up-qac) | Give Inlay the QAC project, license, coding standards, and first-party source. |
| 2. [Analyze and report](#analyze-and-report) | Run `/validate-qac` for findings and reports. |
| 3. [Connect to Perforce Validate](#connect-to-perforce-validate) | Upload builds so your team reviews findings on a shared server. |
| 4. [Record deviations and baselines](#record-deviations-and-baselines) | Accept single findings, or a build's existing findings as known debt. |
| 5. [Gate a release](#gate-a-release-on-qac-and-hardware-tests) | Check a build's new findings together with its hardware test results. |

### Set up QAC

Have these ready:

* the controlled QAC project (its `prqaproject.xml` file and `prqa` directory);
* the current build inputs;
* the standard and the analysis components it needs;
* your first-party source roots.

Set these in the Perforce QAC settings when they apply to you. In VS Code, select **Settings** in the Perforce QAC details. Its search box finds a setting by either name.

| Setting | In VS Code | When to set it |
| - | - | - |
| **First-party source roots** | **First-Party Folders** | Always. List the folders that hold your own code, such as `src` and `include`. Setup needs them before it captures the build. |
| **License servers** | **License Server** | QAC should check out licenses from specific servers. Enter `port@host` entries in the order QAC should try them. |
| **RLM license file** | **License File** | Your license comes from a file. Use a path relative to the workspace or an absolute path. |
| **Compliance module profiles** | **Coding Standards** | You need one or more coding standards, such as MISRA C:2012, AUTOSAR C++14, CERT C, or CWE. Select every standard that applies. Setup uses the installed, licensed version of each module. |
| **Approved baseline source** | **Baseline for Existing Findings** | You accept existing findings as known debt. Choose **Validate**, **Unified project**, **Version controlled**, or **Local evaluation**. The default is **No baseline**. |

Then start setup in chat. In VS Code, you can also open Perforce QAC in the **Static Analysis** panel and select **Set Up with Agent**, or **Continue with Agent** once some setup checks are ready.

```text theme={"theme":"css-variables"}
/validate-qac Set up QAC for the release build with MISRA C:2012. Our code is
in src and include. Stop when setup is ready, and don't analyze yet.
```

QAC reports cover only first-party code. Vendor, adopted, generated, and external code is excluded before analysis, so confirm those boundaries first. Inlay doesn't replace the project's rule configuration unless you supply the new one and approve the change.

To check setup later without running an analysis, run `inlay qac readiness` in a terminal at the project root. It prints JSON and exits with `1` when setup is missing something.

### Analyze and report

Run `/validate-qac` and say what to analyze and report:

```text theme={"theme":"css-variables"}
/validate-qac Analyze the release configuration against MISRA C:2012. Report
findings by rule and file, and list anything that could not be analyzed.
```

In VS Code, when no setup check is marked **Needed**, **Analyze Project**, **Review Findings**, and **Generate Reports** under **Workflows** in the Perforce QAC details start those steps in chat.

Reports go to `.inlay/reports/qac` by default.

For questions about a specific part of QAC, use the bundled skills:

| Skill | Use it for |
| - | - |
| `/qac-quick-start` | The shortest path from a new project to a first analysis and report. |
| `/qac-cli` | `qacli` flags, project setup, licensing checks, analysis, reports, and QAC errors. |
| `/qac-live` | Running QAC right after Inlay edits C or C++ code, then fixing the reported lines. |
| `/qac-dataflow` | Dataflow depth, inter-translation-unit dataflow, and dataflow timeouts. |
| `/qac-mta` | Multi-threading analysis, such as data races and deadlocks. |
| `/qac-rcma` | Cross-module analysis, CMA solutions, and project-wide metrics. |

### Connect to Perforce Validate

Publish QAC results to Perforce Validate when your team reviews findings, deviations, and baselines on a shared server. Turn on **Connect to Validate** (**Share Results with Team** under **Team Sharing** in VS Code), then set:

| Setting | In VS Code | Value |
| - | - | - |
| **Validate server URL** | **Team Server Address** | Your Validate server, such as `https://validate.example.com:8080`. The URL must use HTTPS. |
| **Validate project or stream** | **Project on Team Server** | The Validate destination, such as `team/project`. |
| **Validate API user** | **Team Server Username** | A named, licensed Validate account. |
| **Validate token variable** | **Access Token Variable** | The environment variable that holds the Validate login token. The name must start with `QAC_` or `VALIDATE_`. The default is `QAC_VALIDATE_TOKEN`. |

Inlay doesn't store the token in the project configuration. Set the variable in the environment that runs Inlay:

```bash theme={"theme":"css-variables"}
export QAC_VALIDATE_TOKEN="<your Validate token>"
```

Further Validate settings control what is synchronized: **Share configuration when connecting**, **Refresh rules before analysis**, **Fetch Validate diagnostics**, and **Apply Validate suppressions**. In VS Code, they are **Share Local Settings on Connect**, **Get Team Rules Before Analysis**, **Include Team Findings**, and **Use Team Suppressions**.

Inlay works with Validate through the [`inlay qac`](/docs/headless/cli-reference#perforce-qac-commands) command. You can run it yourself, or Inlay runs it from chat. Every command prints JSON.

```bash theme={"theme":"css-variables"}
# Preview, then connect the QAC project to Validate
inlay qac connect --server https://validate.example.com:8080
inlay qac connect --yes --server https://validate.example.com:8080

# Analyze and upload a build, then list its findings
inlay qac upload --build 1.4.0 --yes --server https://validate.example.com:8080
inlay qac findings --build 1.4.0 --server https://validate.example.com:8080
```

Changes on the Validate server need your consent:

* `connect`, `upload`, `deviation`, and `baseline` are dry runs by default. They print the planned change. Add `--yes` to apply it.
* Inlay sends the Validate token only when you pass `--server` with the same origin as **Validate server URL**. A server URL in the repository settings alone can't authorize sending the token.
* When Inlay runs `inlay qac` with `--server`, or runs `deviation` or `baseline` with `--yes`, it asks for your approval first. These approvals can't be granted automatically, so background runs are denied.

After an upload, the build's open findings in your first-party source files appear in VS Code's **Problems** panel, each with a link to the finding in Validate. They clear when a source file changes. To publish them again while the sources still match the upload, run `inlay qac diagnostics` with `--server`.

### Record deviations and baselines

To accept a single finding, record a deviation. Give the Validate finding ID, which `inlay qac findings` lists, a rationale, the risk, and how the risk is verified. Each text needs at least 10 characters.

```bash theme={"theme":"css-variables"}
inlay qac deviation 4127 \
  --rationale "Register access requires a volatile cast." \
  --risk "Wrong address could corrupt peripheral state." \
  --verification "Covered by the UART HIL suite on every build." \
  --server https://validate.example.com:8080
```

Without `--yes`, this prints the planned deviation. Run it again with `--yes` to record it. Inlay then sets the finding's status in Validate to **Not a Problem**, with your texts as its comment.

To accept all current findings of a build as known debt, approve a baseline. The build must be the latest one on Validate. Without `--yes`, Inlay saves a draft and prints its path and the number of findings it covers. Review the draft, then run the command again with `--yes` and the same build and rationale. With **Approved baseline source** set, Inlay also sets that QAC baseline.

```bash theme={"theme":"css-variables"}
inlay qac baseline --build 1.4.0 --rationale "Legacy driver findings accepted for release 1.4." --server https://validate.example.com:8080
```

Inlay keeps approved deviations and baselines under `.inlay/qac/`.

### Gate a release on QAC and hardware tests

Use the verification gate when a firmware build needs QAC results and hardware-in-the-loop (HIL) results that match the same sources. The gate compares the build's findings with your approved baseline, so [approve a baseline](#record-deviations-and-baselines) first. The build you gate must be the latest one on Validate.

1. Record the firmware build. `inlay qac build` runs your build command and records digests of the sources and the firmware artifact. The command must only build the firmware, not flash it. It must rewrite the artifact file and finish within 10 minutes.

   ```bash theme={"theme":"css-variables"}
   inlay qac build --build 1.4.0 --artifact build/app.elf --command "make release"
   ```

2. Upload the same build to Validate.

   ```bash theme={"theme":"css-variables"}
   inlay qac upload --build 1.4.0 --yes --server https://validate.example.com:8080
   ```

3. Ask Inlay to run your HIL suite for that build and artifact as a [hardware script](/docs/debug-mode/hardware-scripts.md). The script must load the firmware through GDB exactly once, on real hardware, and return each test's name and result: passed, failed, or skipped. Inlay records the results under `.inlay/qac/hil/` and reports the file's path. Results you write yourself fail the gate.

4. Run the gate. Add `--pack` to also create an evidence pack.

   ```bash theme={"theme":"css-variables"}
   inlay qac verify --build 1.4.0 --artifact build/app.elf --hil .inlay/qac/hil/<run-id>.json --pack --server https://validate.example.com:8080
   ```

The gate fails, and the command exits with `1`, when any of these is true:

* The QAC analysis is incomplete, components were skipped, or compiler introspection was turned off or its errors ignored.
* The current sources don't match the uploaded Validate build.
* The build has new required, mandatory, or unclassified findings.
* The HIL results are for a different build, sources, or artifact, have no passing test, or report failed or skipped tests.

The evidence pack goes to `.inlay/reports/verification/` as a folder and a `.zip` archive. It contains the QAC reports, deviations, baselines, and a verification summary. The gate also refreshes the `qac-compliance` dashboard, which you can open with `inlay dashboard qac-compliance`.

The evidence pack is a starting point for a review. Requirements traceability, coverage objectives, and certification need a separate assessment.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.