CodeScene PR Check
β Code Health Quality Gates: FAILED
Change in average Code Health of affected files: +0.04 (5.41 -> 5.44)
- Declining Code Health: 1 findings(s) π©
- Improving Code Health: 5 findings(s) β
- Affected Hotspots: 2 files(s) π₯
Details
π© Declining Code Health (highest to lowest):
- Complex Method utils.cpp: compensateLostTargetObjects π₯
β Improving Code Health:
- Overall Code Complexity scene.cpp π₯
- Large Method scene.cpp: StaticObstacleAvoidanceModule::fillFundamentalData π₯
- Primitive Obsession debug.cpp
- Bumpy Road Ahead utils.cpp: updateRegisteredObject π₯
- Code Duplication debug.cpp
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 44.68% to 43.75%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β No longer an issue: Code Duplication
The module no longer contains too many functions with similar structure
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
βΉ Getting worse: Lines of Code in a Single File
The lines of code increases from 1264 to 1268, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting better: Large Method
StaticObstacleAvoidanceModule::fillFundamentalData decreases from 86 to 85 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 5.29 to 5.19, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β New issue: Complex Method
compensateLostTargetObjects has a cyclomatic complexity of 11, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β No longer an issue: Bumpy Road Ahead
updateRegisteredObject is no longer above the threshold for logical blocks with deeply nested code. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
βΉ New issue: Bumpy Road Ahead
compensateLostTargetObjects has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
βΉ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 5.49 to 5.56, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
βΉ New issue: Excess Number of Function Arguments
compensateLostTargetObjects has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.