What unit of measurement is the duplicate complexity setting in for TeamCity's duplicates finder?

StackOverflow https://stackoverflow.com/questions/23570292

  •  19-07-2023
  •  | 
  •  

My team and I are setting up TeamCity's duplicate finder currently. We are looking at the option marked "Ignore duplicates with complexity simpler than" and cannot find any reference as to what unit of measurement it is using. The TeamCity documentation only mentions that it is used to set the complexity and my GoogleFu is failing to help me. Does anyone have any idea what it is?

有帮助吗?

解决方案

It has been years since I asked this, but I have discovered that this feature meant "cyclomatic complexity" when it mentioned complexity.

https://en.wikipedia.org/wiki/Cyclomatic_complexity

其他提示

It is internal unit of measurement used by Resharper commandline tool (which does the actual job). As this blog post says:

Allows setting a threshold for code complexity of duplicated fragments. The fragments with lower complexity are discarded as non-duplicates. The value for this option is provided in relative units. Using this option, you can filter out equal code fragments that present no semantic duplication.

I am not sure about the underlying implementation, though. Most likely, it is a size of an AST fragments that are used for search.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top