Skip to content
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jan 26, 2024 in 39s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 17 findings(s) 🚩
  • Improving Code Health: 19 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):

  • Complex Method scene_intersection.cpp: IntersectionModule::modifyPathVelocityDetail 🔥
  • Complex Method scene_intersection_prepare_data.cpp: IntersectionModule::generateIntersectionStopLines
  • Complex Method scene_intersection_collision.cpp: IntersectionModule::updateObjectInfoManagerCollision
  • Complex Method scene_intersection_collision.cpp: IntersectionModule::calcIntersectionPassingTime
  • Overall Function Size scene_intersection_collision.cpp
  • Complex Method scene_intersection.cpp: IntersectionModule::isOverPassJudgeLinesStatus 🔥
  • Complex Method scene_intersection_collision.cpp: IntersectionModule::detectCollision
  • Complex Method scene_intersection_prepare_data.cpp: IntersectionModule::prepareIntersectionData
  • Bumpy Road Ahead scene_intersection_collision.cpp: IntersectionModule::detectCollision
  • Complex Method scene_intersection_collision.cpp: IntersectionModule::updateObjectInfoManagerArea
  • Complex Method decision_result.cpp: formatDecisionResult
  • Complex Conditional object_manager.cpp: ObjectInfo::can_stop_before_ego_lane
  • Excess Number of Function Arguments object_manager.cpp: ObjectInfoManager::registerExistingObject
  • Complex Method scene_intersection_collision.cpp: IntersectionModule::generateBlameDiagnosis
  • Bumpy Road Ahead scene_intersection_collision.cpp: IntersectionModule::updateObjectInfoManagerCollision
  • Complex Conditional scene_intersection.cpp: IntersectionModule::modifyPathVelocityDetail 🔥
  • Bumpy Road Ahead scene_intersection_collision.cpp: IntersectionModule::generateBlameDiagnosis

✅ Improving Code Health:

  • Complex Method scene_intersection_occlusion.cpp: IntersectionModule::detectOcclusion
  • Bumpy Road Ahead scene_intersection_occlusion.cpp: IntersectionModule::detectOcclusion
  • Complex Method debug.cpp: IntersectionModule::createDebugMarkerArray
  • Lines of Code in a Single File scene_intersection.cpp 🔥
  • Overall Code Complexity scene_intersection.cpp 🔥
  • Brain Method scene_intersection_collision.cpp: IntersectionModule::checkCollision
  • Complex Method scene_intersection.cpp: IntersectionModule::generateTargetObjects 🔥
  • Complex Method scene_intersection_collision.cpp: IntersectionModule::checkCollision
  • Complex Conditional scene_intersection_collision.cpp: IntersectionModule::checkCollision
  • Bumpy Road Ahead scene_intersection_collision.cpp: IntersectionModule::checkCollision
  • Bumpy Road Ahead scene_intersection_collision.cpp: IntersectionModule::isGreenPseudoCollisionStatus
  • Deep, Nested Complexity scene_intersection_collision.cpp: IntersectionModule::checkCollision
  • Deep, Nested Complexity scene_intersection_collision.cpp: IntersectionModule::cutPredictPathWithDuration
  • Excess Number of Function Arguments scene_intersection_collision.cpp: IntersectionModule::checkCollision
  • Excess Number of Function Arguments scene_intersection_collision.cpp: IntersectionModule::calcIntersectionPassingTime
  • Bumpy Road Ahead scene_intersection.cpp: IntersectionModule::generateTargetObjects 🔥
  • Overall Code Complexity debug.cpp
  • Brain Method scene_intersection_occlusion.cpp: IntersectionModule::detectOcclusion
  • Excess Number of Function Arguments scene_intersection_occlusion.cpp: IntersectionModule::detectOcclusion

Annotations

Check warning on line 152 in planning/behavior_velocity_intersection_module/src/object_manager.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

ObjectInfo::can_stop_before_ego_lane 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 warning on line 233 in planning/behavior_velocity_intersection_module/src/object_manager.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

ObjectInfoManager::registerExistingObject has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning 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)

❌ New issue: Overall Function Size

The median function size in this module is 59.0 LOC, threshold = 50.0. This file contains overly long functions, measured by their lines of code.

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)

✅ No longer an issue: Brain Method

IntersectionModule::checkCollision is no longer a brain method. A Brain Method -- aka a God Function -- is a large and complex function that centralizes the behavior of a module. Brain Methods are detected using a combination of the following code smells: Deeply Nested Logic + High Cyclomatic Complexity + Many Lines of Code + Many Function Arguments.

Check notice on line 320 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: Brain Method

IntersectionModule::updateObjectInfoManagerCollision is a brain method. A Brain Method -- aka a God Function -- is a large and complex function that centralizes the behavior of a module. Brain Methods are detected using a combination of the following code smells: Deeply Nested Logic + High Cyclomatic Complexity + Many Lines of Code + Many Function Arguments.

Check warning on line 903 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: Complex Method

IntersectionModule::calcIntersectionPassingTime increases in cyclomatic complexity from 22 to 26, 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_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 Method

IntersectionModule::checkCollision 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 warning on line 320 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::updateObjectInfoManagerCollision has a cyclomatic complexity of 32, 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 562 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::detectCollision has a cyclomatic complexity of 19, 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 131 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::updateObjectInfoManagerArea has a cyclomatic complexity of 13, 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 455 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::generateBlameDiagnosis 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 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)

✅ No longer an issue: Complex Conditional

IntersectionModule::checkCollision 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 422 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 Conditional

IntersectionModule::generateBlameDiagnosis 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_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: Bumpy Road Ahead

IntersectionModule::checkCollision is no longer above the threshold for logical blocks with deeply nested code. 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 366 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: Bumpy Road Ahead

IntersectionModule::isGreenPseudoCollisionStatus is no longer above the threshold for logical blocks with deeply nested code. 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 warning on line 562 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: Bumpy Road Ahead

IntersectionModule::detectCollision has 5 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested 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 warning on line 320 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: Bumpy Road Ahead

IntersectionModule::updateObjectInfoManagerCollision has 3 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested 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 warning on line 455 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: Bumpy Road Ahead

IntersectionModule::generateBlameDiagnosis has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested 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_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 13.71 to 13.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_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: Deep, Nested Complexity

IntersectionModule::checkCollision is no longer above the threshold for nested complexity depth. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

Check notice on line 852 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: Deep, Nested Complexity

IntersectionModule::cutPredictPathWithDuration is no longer above the threshold for nested complexity depth. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

Check notice on line 320 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: Deep, Nested Complexity

IntersectionModule::updateObjectInfoManagerCollision has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

Check notice on line 562 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: Deep, Nested Complexity

IntersectionModule::detectCollision has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

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)

✅ No longer an issue: Excess Number of Function Arguments

IntersectionModule::checkCollision is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check notice on line 903 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: Excess Number of Function Arguments

IntersectionModule::calcIntersectionPassingTime is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.