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(published_time_publisher): add unit test #6610

Merged
merged 6 commits into from
Mar 16, 2024

feat: update

7c775fa
Select commit
Loading
Failed to load commit list.
Merged

feat(published_time_publisher): add unit test #6610

feat: update
7c775fa
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded Mar 15, 2024 in 37s

CodeScene PR Check

Code Health Quality Gates: OK

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 0 findings(s) ✅
  • Affected Hotspots: 0 files(s) 🔥

Recommended Review Level: Lightweight sanity check
View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication test_published_time_publisher.cpp
  • Duplicated Assertion Blocks test_published_time_publisher.cpp

Annotations

Check warning on line 272 in common/tier4_autoware_utils/test/src/ros/test_published_time_publisher.cpp

See this annotation in the file changed.

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

❌ New issue: Code Duplication

The module contains 6 functions with similar structure: TEST:PublishedTimePublisherWithSubscriptionTest:MultiplePublishMsgWithHeader,TEST:PublishedTimePublisherWithSubscriptionTest:MultiplePublishMsgWithTimestamp,TEST:PublishedTimePublisherWithSubscriptionTest:PublishMsgWithHeader,TEST:PublishedTimePublisherWithSubscriptionTest:PublishMsgWithTimestamp and 2 more functions. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 200 in common/tier4_autoware_utils/test/src/ros/test_published_time_publisher.cpp

See this annotation in the file changed.

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

❌ New issue: Duplicated Assertion Blocks

The test suite contains 3 functions with duplicated assertion blocks (TEST:PublishedTimePublisherWithSubscriptionTest:MultiplePublishMsgWithHeader,TEST:PublishedTimePublisherWithSubscriptionTest:MultiplePublishMsgWithTimestamp,TEST:PublishedTimePublisherWithSubscriptionTest:PublishMsgWithTimestamp), threshold = 2. This test file has several blocks of duplicated assertion statements. Avoid adding more.