Skip to content

define vector concatenate function

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jun 27, 2024 in 55s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 14 findings(s) 🚩
  • Improving Code Health: 8 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Conditional node.cpp: ObstacleCruisePlannerNode::onTrajectory
  • Complex Method node.cpp: ObstacleCruisePlannerNode::createSlowDownObstacleForPredictedObject
  • Deep, Nested Complexity node.cpp: ObstacleCruisePlannerNode::convertToObstacles
  • Large Method node.cpp: ObstacleCruisePlannerNode::BehaviorDeterminationParam::onParam
  • Complex Method node.cpp: ObstacleCruisePlannerNode::convertToObstacles
  • Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::createSlowDownObstacleForPredictedObject
  • Complex Method node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles
  • Complex Method node.cpp: ObstacleCruisePlannerNode::onTrajectory
  • Deep, Nested Complexity node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles
  • Complex Method node.cpp: ObstacleCruisePlannerNode::createStopObstacleForPredictedObject
  • Complex Method node.cpp: ObstacleCruisePlannerNode::convertToObstacles
  • Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::convertToObstacles
  • Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles
  • Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::createStopObstacleForPredictedObject

✅ Improving Code Health:

  • Complex Method node.cpp: ObstacleCruisePlannerNode::createSlowDownObstacle
  • Complex Method node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstObstacles
  • Complex Method node.cpp: ObstacleCruisePlannerNode::createStopObstacle
  • Deep, Nested Complexity node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstObstacles
  • Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::createSlowDownObstacle
  • Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::determineEgoBehaviorAgainstObstacles
  • Bumpy Road Ahead node.cpp: ObstacleCruisePlannerNode::createStopObstacle
  • Primitive Obsession node.cpp

Annotations

Check notice on line 1 in planning/autoware_obstacle_cruise_planner/src/node.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 1243 to 1486, 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 920 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

ObstacleCruisePlannerNode::convertToObstacles increases in cyclomatic complexity from 10 to 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 1601 in planning/autoware_obstacle_cruise_planner/src/node.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

ObstacleCruisePlannerNode::createSlowDownObstacle 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 1008 in planning/autoware_obstacle_cruise_planner/src/node.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

ObstacleCruisePlannerNode::determineEgoBehaviorAgainstObstacles 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 1421 in planning/autoware_obstacle_cruise_planner/src/node.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

ObstacleCruisePlannerNode::createStopObstacle 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 1601 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ObstacleCruisePlannerNode::createSlowDownObstacleForPredictedObject has a cyclomatic complexity of 23, 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 1008 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles 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 613 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ObstacleCruisePlannerNode::onTrajectory 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 1421 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ObstacleCruisePlannerNode::createStopObstacleForPredictedObject has a cyclomatic complexity of 11, 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 1 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ObstacleCruisePlannerNode::convertToObstacles 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 warning on line 561 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Conditional

ObstacleCruisePlannerNode::onTrajectory increases from 1 complex conditionals with 2 branches to 1 complex conditionals with 5 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 337 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ Getting worse: Large Method

ObstacleCruisePlannerNode::BehaviorDeterminationParam::onParam increases from 74 to 89 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 1601 in planning/autoware_obstacle_cruise_planner/src/node.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

ObstacleCruisePlannerNode::createSlowDownObstacle 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 1008 in planning/autoware_obstacle_cruise_planner/src/node.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

ObstacleCruisePlannerNode::determineEgoBehaviorAgainstObstacles 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 1421 in planning/autoware_obstacle_cruise_planner/src/node.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

ObstacleCruisePlannerNode::createStopObstacle 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 1601 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

ObstacleCruisePlannerNode::createSlowDownObstacleForPredictedObject has 6 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 920 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

ObstacleCruisePlannerNode::convertToObstacles 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 1008 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles 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 warning on line 1421 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

ObstacleCruisePlannerNode::createStopObstacleForPredictedObject 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/autoware_obstacle_cruise_planner/src/node.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.37 to 4.63, 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 1008 in planning/autoware_obstacle_cruise_planner/src/node.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

ObstacleCruisePlannerNode::determineEgoBehaviorAgainstObstacles 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 warning on line 920 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

ObstacleCruisePlannerNode::convertToObstacles has a nested complexity depth of 6, 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 warning on line 1008 in planning/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

ObstacleCruisePlannerNode::determineEgoBehaviorAgainstPredictedObjectObstacles 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/autoware_obstacle_cruise_planner/src/node.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Primitive Obsession

The ratio of primivite types in function arguments is no longer above the threshold

Check notice on line 442 in planning/autoware_obstacle_cruise_planner/src/planner_interface.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Complex Method

PlannerInterface::calculateMarginFromObstacleOnCurve increases in cyclomatic complexity from 11 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.