码迷,mamicode.com
首页 > 其他好文 > 详细

sonarqube中new issue的标准

时间:2019-04-09 18:15:13      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:which   his   nbsp   close   not   algo   https   nal   ring   

https://docs.sonarqube.org/latest/user-guide/issues/#header-4

Understanding which Issues are "New"

To determine the creation date of an issue, an algorithm is executed during each analysis to determine whether an issue is new or existed previously.

This algorithm relies on content hashes (excluding whitespace) for the line the issue is reported on.

For multi-line issues, the hash of the first line is used.

For each file (after detection of file renaming), the algorithm takes the base list of issues from the previous analysis, and tries to match those issues with the raw issue list reported by the new analysis.

The algorithm tries to first match using the strongest evidence, and then falls back to weaker heuristics启发式的.

  • if the issue is on the same rule, with the same line number and with the same line hash (but not necessarily with the same message) > MATCH
  • detect block move inside file, then if the issue is on the same (moved) line and on the same rule (but not necessarily with the same message) > MATCH
  • on the same rule, with the same message and with the same line hash (but not necessarily with the same line) > MATCH
  • on the same rule, with the same message and with the same line number (but not necessarily with the same line hash) > MATCH
  • on the same rule and with the same line hash (but not the same message and not the same line) > MATCH
  • is there a matching CLOSED issue > MATCH and Reopen

Unmatched "base" issues are closed as fixed.

Unmatched "raw" issues are new.

 

sonarqube中new issue的标准

标签:which   his   nbsp   close   not   algo   https   nal   ring   

原文地址:https://www.cnblogs.com/chucklu/p/10678639.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!