Concepts
Comment Ratio
Comment ratio measures the number of comments within the programming code relative to the total lines of code, serving as an indicator of code readability and documentation quality. Comment ratio = Number of lines containing comments/(Number of code lines without comments + Number of lines containing comments) ×100%
- Number of lines containing comments: the number of source code lines that are either comments or commented-out code.
- Unnecessary comments (empty comment and comment containing only special characters) are not counted. For details, see Viewing Code Metrics.
Duplication rate
Duplicate lines are code lines repeated at least once. A duplicate block consists of these repeated lines. (In Java, a duplicate block has 10 or more identical consecutive lines. In other languages, a duplicate block has more than 100 consecutive duplicate characters across 10 lines.) Duplication rate = Number of duplicate lines/Total number of code lines (excluding blank lines and comments) × 100%. For details, see Viewing Code Metrics.
Rule set
A set of check rules defined for specific languages to improve code quality. For details, see Configuring a Preset Rule Set.
Cyclomatic Complexity
High cyclomatic complexity indicates complex code harder to maintain and test. Such files are more likely to contain errors during code reconstruction. Average cyclomatic complexity = Total cyclomatic complexity/Total number of functions. The risk level varies with the complexity value:
- 1–5: little risk
- 6–10: moderate risk
- 11–20: medium risk
- 21–50: high risk
- 51+: extremely high risk
- NA: language not supported
For details, see Viewing Code Metrics.
Deferral period
The upgraded check engines may detect new issues. These new issues will be counted if not fixed or masked during a 60-day buffer period.
Execution Plan
You can define plans to trigger check tasks automatically. These triggers make code check more flexible and easier.
What is your overall rating for this page?
Thank 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