Skip to content
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Dec 16, 2024 in 1m 10s

CodeScene PR Check

❌ Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.24 (4.26 -> 4.02)

  • Declining Code Health: 6 findings(s) 🚩

  • Affected Hotspots: 1 files(s) πŸ”₯

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Large Method manager.cpp: GoalPlannerModuleManager::initGoalPlannerParameters
  • Complex Method goal_planner_module.cpp: LaneParkingPlanner::onTimer πŸ”₯
  • Bumpy Road Ahead goal_planner_module.cpp: LaneParkingPlanner::onTimer πŸ”₯
  • Complex Method goal_planner_module.cpp: GoalPlannerModule::planPullOverAsOutput πŸ”₯
  • Complex Method goal_planner_module.cpp: GoalPlannerModule::selectPullOverPath πŸ”₯
  • Bumpy Road Ahead goal_planner_module.cpp: GoalPlannerModule::selectPullOverPath πŸ”₯

Annotations

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 worse: Lines of Code in a Single File

The lines of code increases from 1876 to 1967, 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 572 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 worse: Complex Method

LaneParkingPlanner::onTimer increases in cyclomatic complexity from 29 to 47, 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 1602 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 worse: Complex Method

GoalPlannerModule::planPullOverAsOutput already has high cyclomatic complexity, and now it increases in Lines of Code from 70 to 71. 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 1323 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 worse: Complex Method

GoalPlannerModule::selectPullOverPath increases in cyclomatic complexity from 13 to 14, 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 572 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 worse: Bumpy Road Ahead

LaneParkingPlanner::onTimer increases from 3 to 8 logical blocks with deeply nested code, threshold is one single block per function. 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 warning on line 1323 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 worse: Bumpy Road Ahead

GoalPlannerModule::selectPullOverPath increases from 2 to 3 logical blocks with deeply nested code, threshold is one single block per function. 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 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 worse: Overall Code Complexity

The mean cyclomatic complexity increases from 6.44 to 6.78, 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 275 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/manager.cpp

See this annotation in the file changed.

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

❌ Getting worse: Large Method

GoalPlannerModuleManager::initGoalPlannerParameters increases from 340 to 345 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.