Main Content

Code Quality Dashboard

View code quality metrics for projects

Since R2023a

Description

Use the Code Quality Dashboard to view code quality metrics for projects, including code analysis, test and coverage results, and requirements verification status.

Code Quality Dashboard with metric results for a project.

Open the Code Quality Dashboard App

Open a project, then use one of these approaches to open the app:

  • MATLAB® Toolstrip: In the Project tab, in the Tools menu, under Apps, click Code Quality Dashboard.

  • MATLAB command prompt: Enter codeQualityDashboard.

Examples

expand all

Open the MATLABShortestPath project.

openProject("MATLABShortestPath");

Open the Code Quality Dashboard.

codeQualityDashboard;

initial-code-quality-dashboard.png

This example shows how to collect test and requirements metric results and reflect the results in the Code Quality Dashboard.

Open the MATLABShortestPath project.

openProject("MATLABShortestPath");

Open the Code Quality Dashboard.

codeQualityDashboard

Open the MATLAB Test Manager.

matlabTestManager

Run all tests in the project by clicking the Run button run_16.png.

test-manager.png

Refresh the Code Quality Dashboard to view the updated results. In the banner, click Update Artifact, then click Refresh All.

code-quality-dashboard.png

This example shows how to collect coverage metric results and reflect the results in the Code Quality Dashboard.

Open the MATLABShortestPath project.

openProject("MATLABShortestPath");

Open the Code Quality Dashboard.

codeQualityDashboard

Open the MATLAB Test Manager.

matlabTestManager

In the toolstrip, click the Coverage button coverage_16.png and select Enable Coverage, then set the coverage metric level to MC/DC.

Run tests and collect coverage by clicking the Run button run_16.png.

Refresh the coverage metric results in the Code Quality Dashboard. In the banner, click Update Artifact, then click Refresh All.

quality-dashboard-coverage.png

Version History

Introduced in R2023a