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

fix(lane_change): enable cancel when ego in turn direction lane #9124

refactor get_ego_footprint

1764376
Select commit
Loading
Failed to load commit list.
Merged

fix(lane_change): enable cancel when ego in turn direction lane #9124

refactor get_ego_footprint
1764376
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Nov 7, 2024 in 33s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.26 (5.40 -> 5.14)

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

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method manager.cpp: LaneChangeModuleManager::set_params
  • Complex Conditional scene.cpp: NormalLaneChange::update_dist_from_intersection 🔥
  • Lines of Code in a Single File utils.cpp 🔥
  • Complex Method scene.cpp: NormalLaneChange::check_candidate_path_safety 🔥
  • Complex Method scene.cpp: NormalLaneChange::update_dist_from_intersection 🔥

✅ Improving Code Health:

  • Overall Code Complexity utils.cpp 🔥

Annotations

Check warning on line 181 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 223 to 225. 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_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: Lines of Code in a Single File

The lines of code increases from 1623 to 1676, 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 1436 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: Complex Method

NormalLaneChange::check_candidate_path_safety increases in cyclomatic complexity from 10 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 warning on line 2174 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::update_dist_from_intersection 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 warning on line 2155 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::update_dist_from_intersection has 2 complex conditionals with 4 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.75 to 4.91, 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 1 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils/utils.cpp

See this annotation in the file changed.

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

❌ New issue: Lines of Code in a Single File

This module has 1035 lines of code, 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 1 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/utils/utils.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 5.08 to 4.95, 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.