refactor(start_planner): refactor debug and safety check logic #5747
This check has been archived and is scheduled for deletion.
Learn more about checks retention
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)
failed
Dec 5, 2023 in 41s
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 1 findings(s) 🚩
- Improving Code Health: 4 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: StartPlannerModuleManager::StartPlannerModuleManager
✅ Improving Code Health:
- Large Method manager.cpp: GoalPlannerModuleManager::GoalPlannerModuleManager
- Lines of Code in a Single File start_planner_module.cpp 🔥
- Complex Conditional start_planner_module.cpp: StartPlannerModule::isExecutionReady 🔥
- Bumpy Road Ahead start_planner_module.cpp: StartPlannerModule::isStopped 🔥
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Large Method
StartPlannerModuleManager::StartPlannerModuleManager increases from 234 to 235 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: Lines of Code in a Single File
The lines of code decreases from 1017 to 1012, 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)
✅ No longer an issue: Complex Conditional
StartPlannerModule::isExecutionReady no longer has a complex conditional. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
StartPlannerModule::isStopped 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.
Check notice on line 258 in planning/behavior_path_planner/src/scene_module/goal_planner/manager.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Large Method
GoalPlannerModuleManager::GoalPlannerModuleManager decreases from 322 to 320 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.
Loading