Skip to content

insert the previous slowdown point in the downsampled trajectory

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Aug 21, 2024 in 37s

CodeScene PR Check

❌ Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.04 (9.40 -> 9.36)

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 1 findings(s) βœ…

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method obstacle_velocity_limiter_module.cpp: ObstacleVelocityLimiterModule::plan
  • Bumpy Road Ahead obstacle_velocity_limiter.cpp: calculate_slowdown_intervals

βœ… Improving Code Health:

  • Large Method obstacle_velocity_limiter_module.cpp: ObstacleVelocityLimiterModule::plan

Annotations

Check warning on line 145 in planning/motion_velocity_planner/autoware_motion_velocity_obstacle_velocity_limiter_module/src/obstacle_velocity_limiter.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

calculate_slowdown_intervals 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 211 in planning/motion_velocity_planner/autoware_motion_velocity_obstacle_velocity_limiter_module/src/obstacle_velocity_limiter_module.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ObstacleVelocityLimiterModule::plan 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/motion_velocity_planner/autoware_motion_velocity_obstacle_velocity_limiter_module/src/obstacle_velocity_limiter_module.cpp

See this annotation in the file changed.

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

βœ… No longer an issue: Large Method

ObstacleVelocityLimiterModule::plan is no longer above the threshold for lines of code