SonarQube 指标定义 | 您所在的位置:网站首页 › coverage中文翻译 › SonarQube 指标定义 |
该指标包含注释或已注释代码的行数。不重要的注释行(即空注释行、只包含特殊字符的注释行等)不会增加注释行数量。 以下代码片段例子包含了9个注释行数:
/** +0 => empty comment line * +0 => empty comment line * This is my documentation +1 => significant comment * although I don't +1 => significant comment * have much +1 => significant comment * to say +1 => significant comment * +0 => empty comment line *************************** +0 => non-significant comment * +0 => empty comment line * blabla... +1 => significant comment */ +0 => empty comment line /** +0 => empty comment line * public String foo() { +1 => commented-out code * System.out.println(message); +1 => commented-out code * return message; +1 => commented-out code * } +1 => commented-out code */ +0 => empty comment line |
CopyRight 2018-2019 实验室设备网 版权所有 |