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

chore(intersection): target type param #6325

Merged
merged 1 commit into from
Feb 8, 2024

chore(intersection): target type param

f207176
Select commit
Loading
Failed to load commit list.
Merged

chore(intersection): target type param #6325

chore(intersection): target type param
f207176
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Feb 7, 2024 in 44s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 5 findings(s) 🚩
  • Improving Code Health: 2 findings(s) ✅
  • Affected Hotspots: 0 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):

  • Code Duplication scene_intersection_stuck.cpp
  • Complex Method scene_intersection_stuck.cpp: IntersectionModule::checkYieldStuckVehicleInIntersection
  • Complex Method scene_intersection_stuck.cpp: IntersectionModule::isTargetYieldStuckVehicleType
  • Complex Method scene_intersection_stuck.cpp: IntersectionModule::isTargetStuckVehicleType
  • Complex Method scene_intersection_collision.cpp: IntersectionModule::isTargetCollisionVehicleType

✅ Improving Code Health:

  • Complex Conditional scene_intersection_collision.cpp: IntersectionModule::isTargetCollisionVehicleType
  • Complex Conditional scene_intersection_stuck.cpp: IntersectionModule::isTargetStuckVehicleType

Annotations

Check warning on line 62 in planning/behavior_velocity_intersection_module/src/scene_intersection_collision.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

IntersectionModule::isTargetCollisionVehicleType has a cyclomatic complexity of 15, 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 60 in planning/behavior_velocity_intersection_module/src/scene_intersection_collision.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

IntersectionModule::isTargetCollisionVehicleType 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 1 in planning/behavior_velocity_intersection_module/src/scene_intersection_collision.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 14.30 to 15.10, 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 199 in planning/behavior_velocity_intersection_module/src/scene_intersection_stuck.cpp

See this annotation in the file changed.

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

❌ New issue: Code Duplication

The module contains 2 functions with similar structure: IntersectionModule::isTargetStuckVehicleType,IntersectionModule::isTargetYieldStuckVehicleType. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 405 in planning/behavior_velocity_intersection_module/src/scene_intersection_stuck.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

IntersectionModule::checkYieldStuckVehicleInIntersection increases in cyclomatic complexity from 18 to 20, 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 226 in planning/behavior_velocity_intersection_module/src/scene_intersection_stuck.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

IntersectionModule::isTargetYieldStuckVehicleType has a cyclomatic complexity of 15, 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 199 in planning/behavior_velocity_intersection_module/src/scene_intersection_stuck.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

IntersectionModule::isTargetStuckVehicleType has a cyclomatic complexity of 15, 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_intersection_module/src/scene_intersection_stuck.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 10.00 to 12.00, 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 224 in planning/behavior_velocity_intersection_module/src/scene_intersection_stuck.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

IntersectionModule::isTargetStuckVehicleType no longer has a complex conditional