Skip to content

feat: add test to utilities and fix code

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jun 6, 2024 in 46s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Overall Code Complexity utilities.cpp
  • Code Duplication test_utilities.cpp

Annotations

Check warning on line 1 in sensing/pointcloud_preprocessor/src/utility/utilities.cpp

See this annotation in the file changed.

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

❌ New issue: Overall Code Complexity

This module has a mean cyclomatic complexity of 4.11 across 9 functions. The mean complexity threshold is 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 warning on line 67 in sensing/pointcloud_preprocessor/test/test_utilities.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 4 functions with similar structure: TEST:RemovePolygonCgalFromCloudTest:PointsAboveMaxZRemain,TEST:RemovePolygonCgalFromCloudTest:PointsBelowMaxZAreRemoved,TEST:RemovePolygonCgalFromCloudTest:PointsInsidePolygonAreRemoved,TEST:RemovePolygonCgalFromCloudTest:PointsOutsidePolygonRemain. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.