Request a PoCDownload
Product

Platform

All features32 capabilities, from IDE to CICompliance KitsISO 26262, DO-178C, IEC 62304...AI GovernanceControl AI-generated C/C++ codeWhat’s new in 2026Latest version highlightsScreenshotsSee the product in action

Analyze & improve

Coding standardsMISRA, CERT, CWE, AUTOSARArchitecture & dependenciesGraphs, matrix, cyclesTechnical debtMeasured in hours and dollarsQuality gatesStop regressions in CISmart Code CityYour codebase in 3D

Integrations

IDE pluginsVisual Studio, VS Code, CLion...CI/CD pipelinesJenkins, Azure DevOps, GitHub, GitLabSonarQube pluginC/C++ results in SonarQubeExternal analyzersClang-Tidy, Cppcheck, coverageFeature on Demand
Solutions

By need

Functional safetyCompliance kits per standardCoding standardsMISRA, CERT, AUTOSAR, ISO...Legacy modernizationRefactor large C/C++ safelyCode auditExpert review of your codebaseM&A due diligenceAssess technical health fast

By role

DevelopersSoftware architectsTech leadsDevOps engineersEngineering managersProject managers

CTOsCIOs / IT leadersQA engineersSecurity leadersComplianceConsultantsRequest a guided PoC
Industries

Safety-critical

AutomotiveISO 26262, MISRA, AUTOSARAerospace & DefenseDO-178C programsMedical DevicesIEC 62304 softwareEnergy & UtilitiesIEC 61508 systemsEmbedded SystemsFirmware and devices

Enterprise

Financial ServicesTrading and paymentsGame DevelopmentEngines and large C++Software VendorsCommercial C/C++ productsGovernmentAgencies and contractorsAll industries & case studies
Resources

Learn

DocumentationGuides, rules and CI setupKnowledge baseFrequently asked questionsBlogC and C++ code quality articlesRelease notesEvery version since 2009

Customers

Case studiesSuccess storiesTestimonialsWhat users sayOur customersCompanies using CppDependGold Code QualityOpen source projects we rate

Programs & company

Feature on DemandMissing features built for freeFree for open sourceLicenses for OSS and studentsContact usSales and supportEULALicense agreement
DocsPricing
Documentation

User Guides

Code Map (2D treemap): user guide

What the Code Map is

The Code Map is a treemap: the whole code base drawn as nested rectangles. Every rectangle is a code element, and the elements of the same parent are grouped together inside the parent's rectangle, which carries its name (Inventory.Domain, Inventory.IO...). Two metrics are drawn at once:

  • Size: the area of a rectangle is proportional to a metric, by default lines of code. A big rectangle is a big element.
  • Color: the color shows a second metric, by default maintainability, from green (good) to yellow to orange (poor).

So a large orange rectangle, like standard or decide in the screenshot, is a big method that is hard to maintain: a good place to start refactoring. A sea of small green rectangles is healthy code.

The Code Map: methods sized by lines of code, colored by maintainability
The Code Map: methods sized by lines of code, colored by maintainability

Toolbar reference

ControlWhat it does
LevelThe kind of element drawn: Project, Namespace, Type or Method (see below).
Zoom in / Zoom out and the numberEach click zooms the map by 10%. The number shows the zoom level (19 in the screenshots). Use it to read the labels of small elements.
Reset view (circular arrow)Resets the zoom and position, removes the highlight and any baseline diff coloring, and redraws the map.
SizeThe metric that defines the area of each element.
Color (toggle)Turns coloring on or off. Off gives a plain map where only sizes matter.
Color metric (here Maintainability)The metric that defines the color.
Info (blue i)Show or hide the info tooltip (below). It is on by default.
Top N (bar chart)Highlights the top elements by the current size metric (below).
Reset HighlightAppears when elements are highlighted. Clears the highlight and redraws the map with the current level and metrics.

Level

Level menu: Project, Namespace, Type, Method
Level menu: Project, Namespace, Type, Method

The same code base at four levels of detail. Project level shows a few large blocks, method level shows every method (the screenshots). Elements are grouped under their parents, so at method level you still see which namespace each method belongs to. Switching level keeps the size and color metrics.

Size and color metrics

Size

Size menu (method level)
Size menu (method level)

At method level the size can be: lines of code (LOC), cyclomatic complexity (CC), number of methods, overloads, parameters, variables, method level, methods called, methods calling me, method rank, lines of code covered, lines of code not covered. Other levels offer the metrics that make sense for them (for example the number of methods in a type). Choose LOC to see where the code is, CC to see where the complexity is, lines not covered to see where untested code is concentrated.

Color

Color menu (method level)
Color menu (method level)

At method level the color can be: debt, lines of code, lines of comment, percentage comment, maintainability, cyclomatic complexity, flash (bytes), RAM (bytes), overloads, parameters, variables, method level, methods called, methods calling me, method rank, percentage coverage, lines of code covered, lines of code not covered. Colors run from green (low, good) to orange (high, poor) for metrics where high is bad, and the reverse for maintainability and coverage, so green always reads as "fine".

Useful pairs:

SizeColorYou see
Lines of codeMaintainabilityBig and hard to maintain code (default).
Lines of codeDebtWhere the technical debt sits.
Cyclomatic complexityPercentage coverageComplex methods that are not tested.
Lines of codePercentage commentLarge, undocumented code.
Methods calling meCyclomatic complexityPopular methods that are also complex: risky to change.
Flash (bytes)RAM (bytes)Footprint, when the project provides linker map data.

Coverage metrics need coverage data imported in the project.

Hovering an element

Hovering an element: blue frame and details tooltip
Hovering an element: blue frame and details tooltip
  • The element under the mouse gets a blue frame.
  • With the Info button on (default), a detailed tooltip appears (screenshot). From top to bottom it shows:
    • the path of the element: project, namespace, type, and the source file with the line number (the small icon next to the line opens the file);
    • the name of the element (here the method standard());
    • its metrics: LOC, Debt, MI (maintainability index, colored), Rating (A to E), CC (cyclomatic complexity), Issues, EC (efferent coupling) and COMMENTS;
    • a reminder of the actions: Double Click for recommendations, Right Click for advanced actions, and "You can deactivate this tooltip from the toolbar".
    The cross at the top right closes the tooltip.
  • With Info off, only a small popup shows the element name and its LOC (for example issue(int,constDate&,int), LOC 18). Use this to keep the map uncluttered.
  • The choice is remembered while you stay in the application.

Highlight the top elements

Highlight the top N elements
Highlight the top N elements

The bar-chart button offers Select Top 10, 20, 50, 100, 200, 500, 1000, 2000 and 5000. It runs a query on the whole solution and highlights the first elements in the current level (methods, types, namespaces or projects), ranked by the current size metric:

  • lines of code, complexity, flash and RAM: the highest values first;
  • maintainability: the lowest index first, so you get the least maintainable code;
  • other metrics fall back to lines of code.

Highlighted elements stay bright, the others are dimmed, and a banner tells how many elements are highlighted with a Reset City link. Use Reset Highlight to come back. Highlighting is also what other pages do when you "show the result on the map", so the same banner can appear after a query or a graph request.

Acting on an element: right-click

Right-click menu on an element
Right-click menu on an element
ItemResult
Prompt BuilderBuilds an AI prompt about the element (submenu). AI is disabled by default; configure your provider first.
Show on Code InsightOpens the element in Code Insight.
Review Diff since BaselineShows what changed in the element since the baseline.
Open source in CppDependOpens the source in the built-in source viewer.
Open Source in IDEOpens the file in your IDE at the element.
Show on Dependency GraphShows the element in the Call Graph.
Append it to GraphAdds the element to the graph already open.
Append it with its dependenciesAdds the element and what it uses and what uses it.
Select Issues / Projects / Modules / Namespaces / Types / Methods / Fields...Selects the related elements of that kind, to continue in other pages or queries.

Draw any query result on the map

From a query result: Export to treemap
From a query result: Export to treemap

From the Queries page, the Export menu of a result has Export to treemap (next to graph, matrix, HTML, Excel, XML and text). The elements of your CQLinq result are highlighted on the Code Map, at the right level. This is the fastest way to see where in the code base the result lives: for example the methods with a complexity above 20, drawn over the whole map.

The query result drawn on the Code Map: the result elements stay bright, all the others are dimmed
The query result drawn on the Code Map: the result elements stay bright, all the others are dimmed

After the export, the elements of the result are highlighted: they stay bright while all the other elements are dimmed, so the result stands out against the whole code base. The banner with the number of highlighted elements and the Reset City link appears, and Reset Highlight brings back the normal map.

Recipes

  1. Where should I refactor first? Size LOC, color Maintainability, method level. Start with large orange rectangles.
  2. Which modules are the biggest? Project or namespace level, size LOC.
  3. Where is complexity hiding? Size Cyclomatic Complexity, color Percentage Coverage.
  4. List the worst 50. Select Top 50, then right-click an element and open it in Code Insight.
  5. Show a query result. Run a query, Export, Export to treemap.
  6. Explain a hotspot. Right-click, Show on Dependency Graph, to see who uses it.
Was this page helpful?Give feedbackRequest a feature