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

refactor(motion_utils)!: add autoware prefix and include dir #7539

Merged

refactor(motion_utils): add autoware prefix and include dir

eaf3682
Select commit
Loading
Failed to load commit list.
Merged

refactor(motion_utils)!: add autoware prefix and include dir #7539

refactor(motion_utils): add autoware prefix and include dir
eaf3682
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jun 18, 2024 in 3m 4s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 21 findings(s) 🚩

  • Affected Hotspots: 1 files(s) 🔥

View detailed results in CodeScene

Absence of Expected Change Pattern

  • autoware.universe/evaluator/perception_online_evaluator/src/metrics_calculator.cpp is usually changed with: autoware.universe/evaluator/perception_online_evaluator/test/test_perception_online_evaluator_node.cpp
  • autoware.universe/planning/autoware_velocity_smoother/src/smoother/jerk_filtered_smoother.cpp is usually changed with: autoware.universe/planning/autoware_velocity_smoother/src/smoother/linf_pseudo_jerk_smoother.cpp

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method planner_interface.cpp: PlannerInterface::generateStopTrajectory
  • Complex Method planner_interface.cpp: PlannerInterface::generateSlowDownTrajectory
  • Complex Method resample.cpp: resamplePath
  • Complex Method scene_intersection_collision.cpp: IntersectionModule::calcIntersectionPassingTime
  • Large Method test_turn_signal.cpp: TEST:BehaviorPathPlanningTurnSignal:Condition3
  • Large Method test_turn_signal.cpp: TEST:BehaviorPathPlanningTurnSignal:Condition1
  • Code Duplication trajectory_utils.cpp
  • Code Duplication static_drivable_area.cpp
  • Large Method test_turn_signal.cpp: TEST:BehaviorPathPlanningTurnSignal:Condition2
  • Complex Method node.cpp: ObstacleStopPlannerNode::onTrigger
  • Complex Method resample.cpp: resampleTrajectory
  • Complex Method shift_pull_out.cpp: ShiftPullOut::plan
  • Complex Method resample.cpp: resampleTrajectory
  • Complex Method resample.cpp: resamplePath
  • Complex Method scene.cpp: DynamicObstacleAvoidanceModule::calcValidLengthToAvoid
  • Complex Method resample.cpp: resampleTrajectory
  • Complex Method resample.cpp: resamplePath
  • Complex Method node.cpp: PathOptimizer::applyInputVelocity
  • Complex Method predicted_path_checker_node.cpp: PredictedPathCheckerNode::onTimer
  • Complex Method scene.cpp: DynamicObstacleAvoidanceModule::calcMinMaxLateralOffsetToAvoidUnregulatedObject
  • Complex Method resample.cpp: resampleTrajectory

Annotations

Check notice on line 1 in common/autoware_motion_utils/src/resample/resample.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Overall Function Size

The median function size increase from 51.0 to 51.5 LOC, threshold = 50.0. This file contains overly long functions, measured by their lines of code.

Check warning on line 333 in common/autoware_motion_utils/src/resample/resample.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

resamplePath already has high cyclomatic complexity, and now it increases in Lines of Code from 70 to 71. 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 406 in common/autoware_motion_utils/src/resample/resample.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

resamplePath already has high cyclomatic complexity, and now it increases in Lines of Code from 70 to 71. 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 715 in common/autoware_motion_utils/src/resample/resample.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

resampleTrajectory already has high cyclomatic complexity, and now it increases in Lines of Code from 94 to 95. 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 548 in common/autoware_motion_utils/src/resample/resample.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

resamplePath already has high cyclomatic complexity, and now it increases in Lines of Code from 70 to 71. 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 648 in common/autoware_motion_utils/src/resample/resample.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

resampleTrajectory already has high cyclomatic complexity, and now it increases in Lines of Code from 94 to 95. 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 326 in control/predicted_path_checker/src/predicted_path_checker_node/predicted_path_checker_node.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

PredictedPathCheckerNode::onTimer already has high cyclomatic complexity, and now it increases in Lines of Code from 86 to 87. 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/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 1238 to 1243, 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 409 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::generateStopTrajectory already has high cyclomatic complexity, and now it increases in Lines of Code from 167 to 168. 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 666 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::generateSlowDownTrajectory already has high cyclomatic complexity, and now it increases in Lines of Code from 116 to 117. 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 477 in planning/autoware_path_optimizer/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

PathOptimizer::applyInputVelocity already has high cyclomatic complexity, and now it increases in Lines of Code from 78 to 79. 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 146 in planning/autoware_path_optimizer/src/utils/trajectory_utils.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: resampleTrajectoryPoints,resampleTrajectoryPointsWithoutStopPoint. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 253 in planning/autoware_velocity_smoother/src/resample.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

resampleTrajectory already has high cyclomatic complexity, and now it increases in Lines of Code from 89 to 90. 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 133 in planning/autoware_velocity_smoother/src/resample.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

resampleTrajectory already has high cyclomatic complexity, and now it increases in Lines of Code from 89 to 90. 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_dynamic_obstacle_avoidance_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 1468 to 1472, 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 1385 in planning/behavior_path_planner/autoware_behavior_path_dynamic_obstacle_avoidance_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

DynamicObstacleAvoidanceModule::calcValidLengthToAvoid already has high cyclomatic complexity, and now it increases in Lines of Code from 82 to 83. 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 1519 in planning/behavior_path_planner/autoware_behavior_path_dynamic_obstacle_avoidance_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

DynamicObstacleAvoidanceModule::calcMinMaxLateralOffsetToAvoidUnregulatedObject already has high cyclomatic complexity, and now it increases in Lines of Code from 71 to 72. 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_goal_planner_module/src/goal_planner_module.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 1950 to 1953, 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/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 1746 to 1747, 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 285 in planning/behavior_path_planner/autoware_behavior_path_planner_common/src/turn_signal_decider.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Complex Method

TurnSignalDecider::getIntersectionTurnSignalInfo already has high cyclomatic complexity, and now it increases in Lines of Code from 125 to 126. 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_planner_common/src/utils/drivable_area_expansion/static_drivable_area.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 1448 to 1449, 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 114 in planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/drivable_area_expansion/static_drivable_area.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 4 functions with similar structure: calcLongitudinalOffsetGoalPoint,calcLongitudinalOffsetStartPoint,findNearestSegmentIndexFromLateralDistance,findNearestSegmentIndexFromLateralDistance. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check notice on line 156 in planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/path_utils.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Complex Method

resamplePathWithSpline already has high cyclomatic complexity, and now it increases in Lines of Code from 74 to 75. 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_planner_common/src/utils/utils.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 1288 to 1292, 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 481 in planning/behavior_path_planner/autoware_behavior_path_planner_common/test/test_turn_signal.cpp

See this annotation in the file changed.

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

❌ Getting worse: Large Method

TEST:BehaviorPathPlanningTurnSignal:Condition3 increases from 117 to 127 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.