VS Code Extensions
C

CMakeSonar

by awaqwq233

Diagnose CMake files with CMakeSonar

Downloads

6

Rating

— (0)

Version

0.1.0

Last updated

Apr 11, 2026

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
  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

Related extensions