Skip to content

feat(goal_planne): check objects within the area between ego edge and…

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Feb 9, 2024 in 1m 7s

CodeScene PR Check

❌ Code Health Quality Gates: FAILED

  • Declining Code Health: 3 findings(s) 🚩
  • Improving Code Health: 1 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: GoalPlannerModuleManager::init
  • Complex Method goal_planner_module.cpp: GoalPlannerModule::setDebugData πŸ”₯
  • Complex Method goal_planner_module.cpp: GoalPlannerModule::isSafePath πŸ”₯

βœ… Improving Code Health:

  • Primitive Obsession util.cpp

Annotations

Check notice on line 1 in planning/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 1590 to 1631, 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 2099 in planning/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::setDebugData already has high cyclomatic complexity, and now it increases in Lines of Code from 156 to 162. 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 1975 in planning/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::isSafePath already has high cyclomatic complexity, and now it increases in Lines of Code from 72 to 73. 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_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 4.82 to 4.84, 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 108 in planning/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::init increases from 323 to 327 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_goal_planner_module/src/util.cpp

See this annotation in the file changed.

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

βœ… Getting better: Primitive Obsession

The ratio of primitive types in function arguments decreases from 44.83% to 43.66%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.

Check notice on line 137 in planning/behavior_path_goal_planner_module/src/util.cpp

See this annotation in the file changed.

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

β„Ή New issue: Excess Number of Function Arguments

generateBetweenEgoAndExpandedPullOverLanes has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.