Delta analysis
Reviewed on Mar 08, 14:19
Review level:
View on GitHub
Code Health
9.71
(-0.03)Code Health Quality gate
Failed
Declining Code Health
1 finding
Improving Code Health
0 findings
Affected Hotspots
1 File
Authors
Declining Code Health(1 type in 1 file)
What lead to degradation?
Header:VFC increases from 179 to 188 lines of code, threshold = 120
Why does this problem occur?
Overly long functions make the code harder to read. The recommended maximum function length for the React language is 120 lines of code. Severity: Brain Method - Complex Method - Long Method.
How to fix it?
We recommend to be careful here -- just splitting long functions don't necessarily make the code easier to read. Instead, look for natural chunks inside the functions that expresses a specific task or concern. Often, such concerns are indicated by a Code Comment followed by an if-statement. Use the EXTRACT FUNCTION refactoring to encapsulate that concern.