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

feat(lane_change): implement terminal lane change feature #9592

add documentation for terminal lane change path

a382a0e
Select commit
Loading
Failed to load commit list.
Merged

feat(lane_change): implement terminal lane change feature #9592

add documentation for terminal lane change path
a382a0e
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Dec 23, 2024 in 1m 0s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.06 (6.53 -> 6.60)

  • Declining Code Health: 1 findings(s) 🚩
  • Improving Code Health: 4 findings(s) ✅
  • Affected Hotspots: 1 files(s) 🔥

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method manager.cpp: LaneChangeModuleManager::set_params

✅ Improving Code Health:

  • Lines of Code in a Single File scene.cpp 🔥
  • Complex Conditional scene.cpp: NormalLaneChange::calcTerminalLaneChangePath 🔥
  • Primitive Obsession calculation.cpp
  • Complex Method scene.cpp: NormalLaneChange::calcTerminalLaneChangePath 🔥

Annotations

Check notice on line 1 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.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 1610 to 1587, 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 1482 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Complex Method

NormalLaneChange::calcTerminalLaneChangePath is no longer above the threshold for cyclomatic complexity. 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 571 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

See this annotation in the file changed.

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

ℹ New issue: Complex Method

NormalLaneChange::insert_stop_point_on_current_lanes has a cyclomatic complexity of 10, 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 1482 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

See this annotation in the file changed.

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

ℹ New issue: Complex Method

NormalLaneChange::compute_terminal_lane_change_path has a cyclomatic complexity of 9, 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 1401 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.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

NormalLaneChange::calcTerminalLaneChangePath 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 549 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

See this annotation in the file changed.

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

ℹ New issue: Complex Conditional

NormalLaneChange::insert_stop_point_on_current_lanes has 1 complex conditionals with 2 branches, threshold = 2. 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 1 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.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.80 to 4.89, 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 notice on line 1 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils/calculation.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 53.97% to 50.00%, 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 76 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils/calculation.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

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

Check warning on line 249 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/manager.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

LaneChangeModuleManager::set_params already has high cyclomatic complexity, and now it increases in Lines of Code from 200 to 205. 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.