Code Inspection: Complex function should be refactored
Reports the functions or methods that are too complex.
Complexity is evaluated based on four metrics:
Lines of code — the number of code lines in a function/method (less is better)
Maximum Nesting depth — the maximum number of nested statements in a function/method body (less is better)
Cyclomatic complexity — the function/method cyclomatic complexity (less is better)
Number of variables — the number of variables used in function/method body
Suppress an inspection in the editor
Place the caret at the highlighted line and press Alt+Enter or click .
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.
Last modified: 16 May 2022