Code Health Dashboard
The Code Health dashboard is your central hub for monitoring the quality, maintainability, and security of your code. This dashboard is populated by the SonarQube integration and provides a high-level overview of your engineering standards.
The Code Health dashboard is composed of three main sections:
- Metric Widgets: A series of top-level widgets that show the current snapshot of your most important code quality metrics.
- Trends Graph: An interactive line chart that plots your code health metrics over time, allowing you to track progress and spot regressions.
- Filters: A filter panel that lets you scope the entire dashboard view to specific projects.
Key metrics
The dashboard displays several key metrics from SonarQube.
| Metric | Description |
|---|---|
| Line Coverage | The percentage of code lines executed by your test suite. |
| Branch Coverage | The percentage of code branches (e.g., if/else statements) executed by your test suite. |
| Open Bugs | The total number of bugs identified by SonarQube’s static analysis. |
| Open Code Smells | The total number of maintainability issues (e.g., complex code, duplication) in your codebase. |
| Open Vulnerabilities | The total number of security vulnerabilities found in your code. |
| Technical Debt | An estimate of the time required to fix all open code smells. |
| Duplicate Line Density | The percentage of code in your project that is duplicated. |
| Cyclomatic Complexity | A measure of your code’s complexity. A higher number means the code is more complex and harder to test or maintain. |
How to use the Dashboard
This dashboard is interactive, allowing you to analyze data in different ways.
Analyze Metric Trends
The Trends graph shows the historical data for your metrics. You can toggle which metric is displayed on the graph.
- Locate the Trends graph at the bottom of the dashboard.
- Click on a metric name (e.g., Open Bugs, Line Coverage, Open Code Smells) in the legend above the graph.
- The graph will update to display the historical trend for that specific metric. This helps you see if your code quality is improving or declining over time.
Filter the Dashboard by project
You can focus the entire dashboard on one or more specific repositories.
- Click the Filter icon in the top-right corner of the dashboard.
- A Filters sidebar will open.
- Under the Project section, check the boxes for the repositories you want to view.
The dashboard will automatically reload, and all widgets and trends will reflect data only for the selected projects.
Set Alerts on Metrics
You can configure alerts to be notified when a metric crosses a specific threshold.
- Find the metric widget you want to set an alert.
- Click the three-dot menu (…) in the top-right corner of the widget.
- Select Set alert.
- In the Set up alert dialog, configure your alert:
-
Alert name: A descriptive name (e.g.,
New Vulnerabilities Found). -
Applicable to: Choose
All teamsorSelected teams. -
Alert condition: Set the threshold (e.g.,
When in a month,Open Vulnerabilitiesismore than0). - Send email to: Select the users or groups to notify.
-
Alert name: A descriptive name (e.g.,
- Click Save.
Add Code Health widgets to other Dashboards
You can use any Code Health metric as a widget on your Home dashboard or on any custom dashboard.
Add to the Home Dashboard
- Navigate to your Home dashboard from the left sidebar.
- Find an empty widget slot or click the three-dot menu (…) on an existing widget you want to replace.
- Select Replace metric.
- In the Replace metric dialog modal, scroll to the Code Health metrics category.
- Select the metric you want to add (e.g.,
Line Coverage).
The widget will be added to your Home dashboard.
Add to a Custom Dashboard
- Navigate to Dashboards and open the custom dashboard you want to edit.
- Click Add Widget.
- In the Add widget dialog, select the Code Health category from the left menu.
- Click on the widget you want to add.
- Configure the widget details.
- Click Done.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!