feat(goal_planne): check objects within the area between ego edge and boudary of pull_over_lanes #6369
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) 🚩
- Improving Code Health: 1 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
Details
🚩 Declining Code Health (highest to lowest):
- Large Method manager.cpp: GoalPlannerModuleManager::init
- Complex Method goal_planner_module.cpp: GoalPlannerModule::setDebugData 🔥
- Complex Method goal_planner_module.cpp: GoalPlannerModule::isSafePath 🔥
✅ Improving Code Health:
- Primitive Obsession util.cpp
Annotations
Check notice on line 1 in planning/behavior_path_goal_planner_module/src/goal_planner_module.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1590 to 1660, 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.
Check warning on line 2137 in planning/behavior_path_goal_planner_module/src/goal_planner_module.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Method
GoalPlannerModule::setDebugData increases in cyclomatic complexity from 25 to 26, 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.
Check warning on line 2011 in planning/behavior_path_goal_planner_module/src/goal_planner_module.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Method
GoalPlannerModule::isSafePath increases in cyclomatic complexity from 9 to 13, 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.
Check notice on line 1 in planning/behavior_path_goal_planner_module/src/goal_planner_module.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 4.82 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.
Check warning on line 108 in planning/behavior_path_goal_planner_module/src/manager.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Large Method
GoalPlannerModuleManager::init increases from 323 to 327 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.
Check notice on line 1 in planning/behavior_path_goal_planner_module/src/util.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 44.83% to 43.66%, 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.
Check notice on line 137 in planning/behavior_path_goal_planner_module/src/util.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
generateBetweenEgoAndExpandedPullOverLanes has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.