从SonarQube中的注释行中删除代码行数

时间:2018-07-31 07:38:02

标签: sonarqube comments

在SonarQube中,默认情况下,注释代码被指定为一种注释行。就像SonarQube文档中的示例一样。

/**                                    +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

如示例所示,结果是9行注释。

如何使SonarQube仅计入“重大评论”?哪个结果应该是5。

0 个答案:

没有答案