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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot