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

feat(tier4_metric_msgs): apply tier4_metric_msgs for scenario_simulator_v2_adapter, control_evaluator, planning_evaluator, autonomous_emergency_braking, obstacle_cruise_planner, motion_velocity_planner, processing_time_checker #9180

Merged
merged 21 commits into from
Nov 12, 2024

manual pre-commit

f532918
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Nov 12, 2024 in 41s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.07 (6.35 -> 6.42)

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 4 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method planner_interface.cpp: PlannerInterface::generateSlowDownTrajectory
  • Complex Method optimization_based_planner.cpp: OptimizationBasedPlanner::generateCruiseTrajectory

✅ Improving Code Health:

  • Overall Code Complexity planning_evaluator_node.cpp
  • Code Duplication control_evaluator_node.cpp
  • Complex Method control_evaluator_node.cpp: ControlEvaluatorNode::onTimer
  • Complex Conditional planner_manager.cpp: MotionVelocityPlannerManager::get_diagnostics

Annotations

Check notice on line 89 in planning/motion_velocity_planner/autoware_motion_velocity_planner_node/src/planner_manager.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

MotionVelocityPlannerManager::get_diagnostics no longer has a complex conditional

Check warning on line 260 in planning/autoware_obstacle_cruise_planner/src/optimization_based_planner/optimization_based_planner.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

OptimizationBasedPlanner::generateCruiseTrajectory already has high cyclomatic complexity, and now it increases in Lines of Code from 130 to 131. 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 682 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 121 to 122. 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/planner_interface.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 5.65 to 5.79, 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 897 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)

ℹ New issue: Excess Number of Function Arguments

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

Check notice on line 1 in evaluator/autoware_planning_evaluator/src/planning_evaluator_node.cpp

See this annotation in the file changed.

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

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.47 to 4.38, 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 evaluator/autoware_control_evaluator/src/control_evaluator_node.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Code Duplication

The module no longer contains too many functions with similar structure

Check notice on line 227 in evaluator/autoware_control_evaluator/src/control_evaluator_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

ControlEvaluatorNode::onTimer is no longer above the threshold for cyclomatic complexity