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
(void)initMyScrollViewContentView{
self.myScrollViewContentView = [[UIView alloc] initWithFrame:CGRectZero]; self.myScrollViewContentView.backgroundColor = RGBCOLOR(0xff, 0xff, 0xff); [self.myScrollView addSubview:self.myScrollViewContentView]; [self.myScrollViewContentView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.mas_equalTo(self.myScrollView); make.width.mas_equalTo(self.myScrollView); make.height.mas_equalTo(ScreenHeight-kNavBar_H-kBottomSafeArea_H-50+self.headerHeight); }]; }
define RGBCOLOR(r,g,b) ([UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1])
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