test(surround_obstacle_checker): add unit tests #9039
+192
−106
Merged
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)
succeeded
Oct 7, 2024 in 57s
CodeScene PR Check
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: +0.48 (8.67 -> 9.15)
- Improving Code Health: 1 findings(s) ✅
Details
✅ Improving Code Health:
- Complex Method node.cpp: SurroundObstacleCheckerNode::getNearestObstacleByDynamicObject
Annotations
Check notice on line 229 in planning/autoware_surround_obstacle_checker/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Complex Method
SurroundObstacleCheckerNode::onTimer already has high cyclomatic complexity, and now it increases in Lines of Code from 77 to 85. 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.
Check notice on line 368 in planning/autoware_surround_obstacle_checker/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
SurroundObstacleCheckerNode::getNearestObstacleByDynamicObject is no longer above the threshold for cyclomatic complexity. 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.
Check notice on line 1 in planning/autoware_surround_obstacle_checker/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 4.07 to 4.91, 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.
Loading