custom threshold for CA1502 in visual studio 2013 ultimate
问题 This question: Custom threshold for CA1502 discusses how to set up custom thresholds for code metrics rules in code analysis. I have the same problem, but think that the old question is out of date. To repeat: In particular, we would like our Build to fail when a method has a code complexity of more than 20. Unfortunately, rule CA1502 has a threshold of 25: The rule reports a violation when the cyclomatic complexity is more than 25. Can we somehow change this? The accepted answer is to edit