Enable an analyzer
In VS Code:- Run
/static-analyzer./lspand/analyzersopen the same Static Analysis panel, on the Installed tab. - Select the Browse tab, select the analyzer you want, then choose Enable. Perforce QAC shows Set Up with Agent instead.
- Open the analyzer from the Installed tab and check its status.
- Work through the Setup list, then set the fields under Settings. Choose This Project to save settings for the current project, or All Projects to save them as your default.
- Before a full scan, try a small one: ask Embedder to run the diagnostics on one folder. See Run project diagnostics.
- Run
/static-analyzerto open Installed Static Analyzers. - Press
mto open Static Analyzer Marketplace. PressSpaceto select each analyzer you want enabled, then pressEnter. - In the installed list, select an analyzer and press
ito see its status and settings. Presspto edit this project’s settings orgto edit your defaults, then pressSpaceorEnterto change the highlighted setting. Pressrto reset the project settings. - To turn an analyzer on or off, select it in the installed list and press
Enterord.
Check the analyzer’s status
In VS Code, each analyzer shows a status that tells you what to do next:
In the terminal UI, the installed list shows
ready, setup required (the same as Needs setup), missing (Not installed), or disabled (Off).
Enabling an entry doesn’t install every tool it needs. Use the status and the Setup list to confirm the analyzer can run. To stop an analyzer’s diagnostics without removing it, turn off its toggle.
Choose the tool
Embedder downloads managed analyzers for you. Install the others yourself and make them available on yourPATH.
For an analyzer you install yourself, its details show an install hint and a Get Installer link once you enable it. Commercial analyzers need your installed product and a valid license. See Static analysis integrations for their workflows.
Use the correct build inputs
For C and C++, supply a currentcompile_commands.json for the target and build variant you’re working on. A compilation database from another board can produce misleading errors or hide real issues.
Point each analyzer at the database:
If you build with an embedded cross-compiler, set clangd’s Cross-compiler locations to the compiler paths, for example
/opt/toolchains/**/arm-none-eabi-*, so it finds the target headers.
For a CMake project, turn on the compilation-database export with your normal configuration options:
Review findings after edits
When Embedder edits a file, enabled analyzers check it. The edit shows a Static analysis card with the number of findings. Expand it to see each finding’s line, rule, and message. Ask Embedder to explain or fix a finding, then let the check run again. To check a coding standard on every edit, open cppcheck and set Per-file compliance to a standard, such as MISRA C:2012 or CERT C:2016. After each C or C++ edit, the card shows the per-file gate result:Run project diagnostics
To check more than the files Embedder edits, ask for a project run:End-to-end MISRA and CERT workflows
For a whole-project MISRA or CERT report, run/validate-MISRA or /validate-CERT.
See Static analysis integrations for the setup, the run, and how to read the report, with cppcheck, clang-tidy, or a commercial analyzer.
Keep settings reusable
Embedder saves project settings in.embedder/lsp.json and your defaults in ~/.embedder/lsp.json. Edit them through the manager, and use project scope for target-specific inputs such as the compilation database.
Embedder can’t change analyzer settings in Plan mode. To have Embedder enable or configure an analyzer for you, switch to Act mode first.