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(autoware_universe_utils): reduce dependence on Boost.Geometry #7778

Merged

Merge branch 'main' into feat/no_boost_geometry

4fc6039
Select commit
Loading
Failed to load commit list.
Merged

feat(autoware_universe_utils): reduce dependence on Boost.Geometry #7778

Merge branch 'main' into feat/no_boost_geometry
4fc6039
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Aug 9, 2024 in 41s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.96 (5.02 -> 4.06)

  • Declining Code Health: 23 findings(s) 🚩
  • Improving Code Health: 1 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication test_geometry.cpp
  • Complex Conditional geometry.cpp: intersects
  • Complex Method geometry.cpp: within
  • Complex Method geometry.cpp: covered_by
  • Deep, Nested Complexity test_geometry.cpp: TEST:geometry:coveredByRand
  • Deep, Nested Complexity test_geometry.cpp: TEST:geometry:touchesRand
  • Complex Method geometry.cpp: convex_hull
  • Deep, Nested Complexity test_geometry.cpp: TEST:geometry:disjointRand
  • Deep, Nested Complexity test_geometry.cpp: TEST:geometry:intersectsRand
  • Deep, Nested Complexity test_geometry.cpp: TEST:geometry:withinPolygonRand
  • Complex Method test_geometry.cpp: TEST:geometry:touchesRand
  • Complex Method test_geometry.cpp: TEST:geometry:coveredByRand
  • Bumpy Road Ahead geometry.cpp: convex_hull
  • Bumpy Road Ahead test_geometry.cpp: TEST:geometry:areaRand
  • Bumpy Road Ahead test_geometry.cpp: TEST:geometry:convexHullRand
  • Bumpy Road Ahead test_geometry.cpp: TEST:geometry:coveredByRand
  • Bumpy Road Ahead test_geometry.cpp: TEST:geometry:disjointRand
  • Bumpy Road Ahead test_geometry.cpp: TEST:geometry:intersectsRand
  • Bumpy Road Ahead test_geometry.cpp: TEST:geometry:touchesRand
  • Bumpy Road Ahead test_geometry.cpp: TEST:geometry:withinPolygonRand
  • Bumpy Road Ahead geometry.cpp: covered_by
  • Bumpy Road Ahead geometry.cpp: intersects
  • Bumpy Road Ahead geometry.cpp: within

✅ Improving Code Health:

  • Code Duplication test_geometry.cpp

Annotations

Check warning on line 804 in common/autoware_universe_utils/src/geometry/geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

within has a cyclomatic complexity of 14, 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 568 in common/autoware_universe_utils/src/geometry/geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

covered_by has a cyclomatic complexity of 14, 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 511 in common/autoware_universe_utils/src/geometry/geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

convex_hull has a cyclomatic complexity of 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 warning on line 658 in common/autoware_universe_utils/src/geometry/geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

intersects 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 511 in common/autoware_universe_utils/src/geometry/geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

convex_hull has 3 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 568 in common/autoware_universe_utils/src/geometry/geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

covered_by 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 717 in common/autoware_universe_utils/src/geometry/geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

intersects 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 804 in common/autoware_universe_utils/src/geometry/geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

within 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 notice on line 1 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Lines of Code in a Single File

The lines of code increases from 1632 to 2536, 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 1 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ Getting worse: Code Duplication

introduced similar code in: TEST:geometry:coveredByRand,TEST:geometry:disjointRand,TEST:geometry:intersectPolygonRand,TEST:geometry:intersectsRand and 2 more functions. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check notice on line 1 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

✅ Getting better: Code Duplication

reduced similar code in: TEST:geometry:getLongitudinalVelocity,TEST:geometry:setLongitudinalVelocity. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 2975 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

TEST:geometry:touchesRand 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 2781 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

TEST:geometry:coveredByRand 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 notice on line 2413 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

ℹ New issue: Large Method

TEST:geometry:intersects 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 notice on line 2271 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

ℹ New issue: Large Method

TEST:geometry:distance 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 notice on line 2626 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

ℹ New issue: Large Method

TEST:geometry:within 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 2665 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

TEST:geometry:areaRand 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 2715 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

TEST:geometry:convexHullRand 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 2781 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

TEST:geometry:coveredByRand 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 2845 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

TEST:geometry:disjointRand 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 2909 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

TEST:geometry:intersectsRand 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 2975 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

TEST:geometry:touchesRand 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 3039 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

TEST:geometry:withinPolygonRand 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 2781 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

TEST:geometry:coveredByRand has a nested complexity depth of 5, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

Check warning on line 2975 in common/autoware_universe_utils/test/src/geometry/test_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Deep, Nested Complexity

TEST:geometry:touchesRand has a nested complexity depth of 5, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.