Skip to content

feat(goal_planner): do not use isActivated() in deciding state transi…

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded Jan 31, 2025 in 44s

CodeScene PR Check

βœ… Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.00 (3.86 -> 3.86)

  • Improving Code Health: 5 findings(s) βœ…
  • Affected Hotspots: 1 files(s) πŸ”₯

View detailed results in CodeScene

Details

βœ… Improving Code Health:

  • Lines of Code in a Single File goal_planner_module.cpp πŸ”₯
  • Overall Code Complexity goal_planner_module.cpp πŸ”₯
  • Complex Method decision_state.cpp: PathDecisionStateController::get_next_state
  • Complex Method goal_planner_module.cpp: GoalPlannerModule::updateData πŸ”₯
  • Excess Number of Function Arguments decision_state.cpp: PathDecisionStateController::transit_state

Annotations

Check notice on line 100 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/decision_state.cpp

See this annotation in the file changed.

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

βœ… Getting better: Complex Method

PathDecisionStateController::get_next_state 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 39 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/decision_state.cpp

See this annotation in the file changed.

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

βœ… Getting better: Excess Number of Function Arguments

PathDecisionStateController::transit_state decreases from 13 to 10 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check notice on line 1 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_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 1905 to 1899, 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 780 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp

See this annotation in the file changed.

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

βœ… Getting better: Complex Method

GoalPlannerModule::updateData decreases in cyclomatic complexity from 20 to 19, 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_planner/autoware_behavior_path_goal_planner_module/src/goal_planner_module.cpp

See this annotation in the file changed.

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

βœ… Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 6.48 to 6.46, 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.