Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>CMakeSonarNew to Visual Studio Code? Get it now.
CMakeSonar

CMakeSonar

awaqwq233

| (0) | Free
Diagnose CMake files with CMakeSonar
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CMakeSonar VS Code Extension

This extension runs CMakeSonar and shows diagnostics directly in VS Code for:

  • CMakeLists.txt
  • *.cmake

Quick start

  1. Open folder vscode-cmakesonar in terminal.
  2. Install dependencies:
    • npm install
  3. Compile extension:
    • npm run compile
  4. Press F5 in VS Code to launch Extension Development Host.

Bundle mode (download and use directly)

This extension now bundles the Python analyzer from the workspace root:

  • cmakesonar_vscode_analyze.py
  • cmakesonar/

Default analyzer path is:

  • ./bundled/python/cmakesonar_vscode_analyze.py

So users installing VSIX / Marketplace version can run directly after configuring a usable Python interpreter.

Commands

  • CMakeSonar: Analyze Current File
  • CMakeSonar: Analyze Workspace
  • CMakeSonar: Show Output

Added capabilities

  • Auto analysis on save (runOnSave)
  • Incremental workspace analysis (only changed files)
  • Dedicated output panel for logs and errors

Settings

  • cmakeSonar.pythonPath: Python executable (default: python)
  • cmakeSonar.analyzerScriptPath: path to analyzer script (default: ../cmakesonar_vscode_analyze.py)
  • cmakeSonar.runOnSave: run automatically on save
  • cmakeSonar.runOnOpen: run automatically on open
  • cmakeSonar.incrementalWorkspaceAnalysis: enable incremental mode for workspace scans

One-click VSIX packaging

  • Run npm run build:vsix in this extension folder
  • The .vsix package will be generated in the extension folder

Internal test flow (recommended before publish)

  1. npm install
  2. npm run build:vsix
  3. In VS Code: install from VSIX
  4. Open a CMake workspace and test diagnostics:
    • CMakeSonar: Analyze Current File
    • CMakeSonar: Analyze Workspace
  5. Verify red squiggles and Problems panel diagnostics.

Marketplace publish checklist

Before publishing, update these fields in package.json:

  • publisher (your real publisher ID)
  • repository.url
  • homepage
  • bugs.url

Then publish:

  1. npm install
  2. npm run compile
  3. vsce login <publisher>
  4. npm run publish:marketplace
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft