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

test(surround_obstacle_checker): add unit tests #9039

Merged
merged 4 commits into from
Oct 7, 2024

fix: shutdown

64a4631
Select commit
Loading
Failed to load commit list.
Merged

test(surround_obstacle_checker): add unit tests #9039

fix: shutdown
64a4631
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded Oct 7, 2024 in 57s

CodeScene PR Check

Code Health Quality Gates: OK

Change in average Code Health of affected files: +0.48 (8.67 -> 9.15)

  • Improving Code Health: 1 findings(s) ✅

View detailed results in CodeScene

Details

✅ Improving Code Health:

  • Complex Method node.cpp: SurroundObstacleCheckerNode::getNearestObstacleByDynamicObject

Annotations

Check notice on line 229 in planning/autoware_surround_obstacle_checker/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

SurroundObstacleCheckerNode::onTimer already has high cyclomatic complexity, and now it increases in Lines of Code from 77 to 85. 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 368 in planning/autoware_surround_obstacle_checker/src/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

SurroundObstacleCheckerNode::getNearestObstacleByDynamicObject is no longer above the threshold for cyclomatic complexity. 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_surround_obstacle_checker/src/node.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.07 to 4.91, 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.