Feat/autoware universe utils #7502
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 21 findings(s) 🚩
Details
🚩 Declining Code Health (highest to lowest):
- Large Assertion Blocks test_geometry.cpp
- Large Assertion Blocks test_boost_polygon_utils.cpp
- Code Duplication test_geometry.cpp
- Large Method test_geometry.cpp: TEST:geometry:calcInterpolatedPose
- Large Method test_geometry.cpp: TEST:geometry:calcInterpolatedPose_with_Spherical_Interpolation
- Lines of Code in a Single File test_geometry.cpp
- Code Duplication test_range.cpp
- Code Duplication test_published_time_publisher.cpp
- Large Method test_geometry.cpp: TEST:geometry:intersect
- Complex Conditional geometry.cpp: intersect
- Large Method test_geometry.cpp: TEST:geometry:getPose
- Large Method test_geometry.cpp: TEST:geometry:getPoint
- Large Method test_geometry.cpp: TEST:geometry:calcOffsetPose
- Large Method test_geometry.cpp: TEST:geometry:transformPoint
- Complex Method boost_polygon_utils.cpp: toPolygon2d
- Excess Number of Function Arguments geometry.cpp: calcOffsetPose
- Lines of Declarations in a Single File sin_table.cpp
- Excess Number of Function Arguments marker_helper.cpp: createDefaultMarker
- Duplicated Assertion Blocks test_geometry.cpp
- Duplicated Assertion Blocks test_published_time_publisher.cpp
- Bumpy Road Ahead boost_polygon_utils.cpp: toPolygon2d
Annotations
Check warning on line 180 in common/autoware_universe_utils/src/geometry/boost_polygon_utils.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
toPolygon2d has a cyclomatic complexity of 9, 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 warning on line 180 in common/autoware_universe_utils/src/geometry/boost_polygon_utils.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
toPolygon2d 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 375 in common/autoware_universe_utils/src/geometry/geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
intersect has 1 complex conditionals with 3 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
Check warning on line 343 in common/autoware_universe_utils/src/geometry/geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
calcOffsetPose has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check warning on line 1 in common/autoware_universe_utils/src/math/sin_table.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Lines of Declarations in a Single File
This module has 8198 lines of data declarations, threshold = 1500. This file contains many data declarations, leading to a long file.
Check warning on line 42 in common/autoware_universe_utils/src/ros/marker_helper.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
createDefaultMarker has 7 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Assertion Blocks
The test suite contains 7 assertion blocks with at least 4 assertions, threshold = 4. This test file has several blocks of large, consecutive assert statements. Avoid adding more.
Check warning on line 1 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Lines of Code in a Single File
This module has 1491 lines of code, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
Check warning on line 221 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 10 functions with similar structure: TEST:geometry:calcAzimuthAngle,TEST:geometry:calcElevationAngle,TEST:geometry:calcInterpolatedPose,TEST:geometry:calcInterpolatedPose_with_Spherical_Interpolation and 6 more functions. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check warning on line 1526 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
TEST:geometry:calcInterpolatedPose has 145 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
Check warning on line 1674 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
TEST:geometry:calcInterpolatedPose_with_Spherical_Interpolation has 117 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
Check warning on line 1831 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
TEST:geometry:intersect has 86 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
Check warning on line 202 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
TEST:geometry:getPose has 83 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
Check warning on line 113 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
TEST:geometry:getPoint has 80 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
Check warning on line 1223 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
TEST:geometry:calcOffsetPose has 73 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
Check warning on line 915 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
TEST:geometry:transformPoint has 72 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
Check warning on line 1831 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Assertion Blocks
The test suite contains 49 assertion blocks with at least 4 assertions, threshold = 4. This test file has several blocks of large, consecutive assert statements. Avoid adding more.
Check warning on line 1831 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Duplicated Assertion Blocks
The test suite contains 3 functions with duplicated assertion blocks (TEST:geometry:calcInterpolatedPose,TEST:geometry:calcInterpolatedPose_with_Spherical_Interpolation,TEST:geometry:calcOffsetPose), threshold = 2. This test file has several blocks of duplicated assertion statements. Avoid adding more.
Check warning on line 235 in common/autoware_universe_utils/test/src/math/test_range.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 5 functions with similar structure: TEST:arange_Test:arange_double,TEST:arange_Test:arange_float,TEST:test_linspace:linspace_double,TEST:test_linspace:linspace_float and 1 more functions. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
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.
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.