Viewing Code Metrics
Code metrics reflect the quality of committed code, helping you detect and fix issues in a timely manner and improving R&D efficiency.
- Cyclomatic Complexity: Measures code complexity. You can determine the logic complexity and modify the code based on the cyclomatic complexity, facilitating subsequent maintenance.
- Duplicates: Evaluates code quality risks. You can modify the redundant code to improve the code quality.
Code cyclomatic complexity is not supported for Shell.
Fixing Code Cyclomatic Complexity Issues
- Go to the Task page. In the task list, click a task name.
- On the View Task Details page, click the Metrics tab to view the cyclomatic complexity and duplicates of the completed check task.
- Click a file name to go to the file details page.
- Click
to view and modify the source code of the file. 
Fixing Code Duplicates Issues
- Go to the Task page. In the task list, click a task name.
- On the View Task Details page, click the Metrics tab to view Duplicates of the completed check task.
- Click a file name to go to the file details page.
The vertical bars on the left of the file details page identify duplicated code blocks. If you click a vertical bar, the list of files that contain the same code blocks is displayed.

Click a file name to compare the duplicated code blocks of the two files.

- Click
to view and modify the source code of the file.