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
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) ✅
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
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Conditional
MotionVelocityPlannerManager::get_diagnostics no longer has a complex conditional
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
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
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
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
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
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
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