octo-technology / sonar-objective-c

Sonar Plugin for Objective C
517 stars 206 forks source link

get the wrong Cyclomatic Complexity of a function #125

Open lmy690043305 opened 6 years ago

lmy690043305 commented 6 years ago

define RGBCOLOR(r,g,b) ([UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1])

wx20180918-143124 2x

Cyclomatic Complexity Number 25 exceeds limit of 10

This method has a macro definition method RGBCOLOR, macro definition inside the cyclomatic complexity is 1, the cyclomatic complexity of the above method should be 2, but the final scan cyclomatic complexity is 25, is wrong, someone encountered similar problems