Skip to content

fix(goal_planner): fix multiple lane ids of shift pull over

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded Nov 18, 2024 in 26s

CodeScene PR Check

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.14 (9.07 -> 9.20)

  • Improving Code Health: 2 findings(s) ✅

View detailed results in CodeScene

Details

✅ Improving Code Health:

  • Complex Method shift_pull_over.cpp: ShiftPullOver::generatePullOverPath
  • Bumpy Road Ahead shift_pull_over.cpp: ShiftPullOver::generatePullOverPath

Annotations

Check notice on line 255 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/pull_over_planner/shift_pull_over.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Complex Method

ShiftPullOver::generatePullOverPath decreases in cyclomatic complexity from 15 to 12, 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 255 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/pull_over_planner/shift_pull_over.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

ShiftPullOver::generatePullOverPath is no longer above the threshold for logical blocks with deeply nested code