← 返回首页
Block with too many statements — CodeQL query help documentation CodeQL docs
CodeQL documentation
CodeQL resources

Block with too many statements

ID: cs/complex-block Kind: problem Security severity: Severity: recommendation Precision: high Tags: - maintainability - complexity - testability Query suites: - csharp-security-and-quality.qls

Click to see the query in the CodeQL repository

Some blocks of code have too many complex statements (branching statements and loops). These blocks are prime candidates for refactoring.

Recommendation

Consider whether it would be better to extract some of the complex statements to their own methods.

References