Ask Me Anything sessions: A unique opportunity to learn more about Sigrid. Sign up now!

The Code Explorer

This page describes the functionality of the “Code Explorer”. For the “Technical Monitor”, with comparable functionality, see the Technical Monitor page. Both can be used for deeper code analysis regarding code quality.

For a general approach analyzing maintainability metrics, see the section for investigating system maintainability rating state and -changes. Using the Code Explorer is also discussed on our page on the agile development process.

Use the code Explorer if you suspect specific maintenance hotspots and want to understand the details

The Code Explorer view lets you explore a system’s codebase and maintainability findings that are associated with it. It is visible by default for all systems.

In a way, it is the reverse of all the finding views, such as maintainability and security. There you start with lists of findings, ordered by the findings’ severity. Then you can investigate where they occur in the code. So these views answer different questions: “Where are my highest quality risks in the code?” (Findings and Maintainability tabs) or “Given a certain file, what are all the risks that could be assessed/refactored?” (Code Explorer).

You can reach this view in different ways: Via the top menu, or clicking an a capability on the System or Portfolio Overview pages. See the system-level Overview page or portfolio-level Overview page. Also, you may be referred to the Code Explorer page by clicking its icon , e.g. on a Delta quality detail page (see elaboration on the Delta Quality page) or the detail view of a Refactoring candidate see the Refactoring candidate elaboration in the system maintainability page.

Different views: directory or component structure

The default view lets you choose between a directory structure. It represents the structure as the source is unpacked at our (SIG’s) side.

By default the structure is collapsed. It can be expanded (or be undone) with the top right icons:

The directory view and component view in most cases are (almost) the same. This can be a matter of how the system is defined or scoped. Scoping choices may allow for specific filtering and componentization, e.g. a component division that does not follow the directory structure or when you are working with multiple repositories. For details on scoping, see the scope configuration page.

Clicking on a directory or component will make 2 panels appear to the right: sources (on top) and findings (on bottom). The panels will change dynamically, depending on e.g. which file and finding you select. By default, a treemap represents the collection of files. The size of the squares/quadrilaterals represents code volume. A mouseover on a file shows volume- and finding counts. In the lower right panel, Maintainability and its metric Duplication are shown by default. They can be changed according to interest.

Clicking on a file will show its source in the top panels. By default, focus in the top panel will jump to the first duplication finding. Findings are highlighted on a yellow/orange spectrum. If 2 or more findings overlap, the overlapping space will be accented with a darker shade. By default (when not clicking a specific finding in the bottom panel), a colored slide on the left of the code lines will reflect where findings are present. A mouseover shows the findings:

If you click on one specific finding in the bottom panel, only the shade will remain, highlighting that one finding. Sigrid assumes that if you choose a specific finding, you are only interested in that finding at the moment, so it filters the other findings from view.

Clicking on one of the finding characteristics again (e.g. Duplication) will bring back the afore mentioned slide/indication of multiple findings.

If desired, you can fold code blocks - based on curly brackets { and } - by clicking the downwards pointing triangle.

Assisting in planning with issue tracker text

Findings that you wish to solve later on can be exported as text with static links for your issue tracker.