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(intersection): additional fix for 8520 #8561

Merged
merged 3 commits into from
Aug 21, 2024

fix for detection lane division

cbd272c
Select commit
Loading
Failed to load commit list.
Merged

fix(intersection): additional fix for 8520 #8561

fix for detection lane division
cbd272c
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Aug 21, 2024 in 59s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.17 (5.98 -> 5.80)

  • Declining Code Health: 3 findings(s) 🚩

  • Affected Hotspots: 1 files(s) 🔥

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method util.cpp: mergeLaneletsByTopologicalSort 🔥
  • Bumpy Road Ahead util.cpp: mergeLaneletsByTopologicalSort 🔥
  • Complex Method scene_intersection_prepare_data.cpp: IntersectionModule::generateDetectionLaneDivisions

Annotations

Check warning on line 962 in planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection_prepare_data.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

IntersectionModule::generateDetectionLaneDivisions 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 1 in planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection_prepare_data.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 12.08 to 12.15, 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 322 in planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/util.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

mergeLaneletsByTopologicalSort increases in cyclomatic complexity from 14 to 17, 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 322 in planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/util.cpp

See this annotation in the file changed.

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

❌ Getting worse: Bumpy Road Ahead

mergeLaneletsByTopologicalSort increases from 4 to 6 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_velocity_planner/autoware_behavior_velocity_intersection_module/src/util.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.44 to 4.75, 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.