Skip to content

refactor getMostInnerLane

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Dec 3, 2024 in 38s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.04 (6.99 -> 6.95)

  • Declining Code Health: 1 findings(s) 🚩

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method util.cpp: createDepartureCheckLanelet

Annotations

Check warning on line 728 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/util.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

createDepartureCheckLanelet increases in cyclomatic complexity from 9 to 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 notice on line 1 in planning/behavior_path_planner/autoware_behavior_path_goal_planner_module/src/util.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.15 to 4.22, 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.