Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(start_planner): refactor debug and safety check logic #5747

replace acceleration and max_velocity with min_acceleration

51bb115
Select commit
Loading
Failed to load commit list.
Merged

refactor(start_planner): refactor debug and safety check logic #5747

replace acceleration and max_velocity with min_acceleration
51bb115
Select commit
Loading
Failed to load commit list.
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

Check warning on line 281 in planning/behavior_path_planner/src/scene_module/start_planner/manager.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 1 in planning/behavior_path_planner/src/scene_module/start_planner/start_planner_module.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 282 in planning/behavior_path_planner/src/scene_module/start_planner/start_planner_module.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 923 in planning/behavior_path_planner/src/scene_module/start_planner/start_planner_module.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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.