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

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

remove unnecessary includes

6f654f6
Select commit
Loading
Failed to load commit list.
Draft

feat(universe_utils): reduce dependence on Boost.Geometry #8974

remove unnecessary includes
6f654f6
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Oct 28, 2024 in 55s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -2.47 (6.50 -> 4.03)

  • Declining Code Health: 28 findings(s) 🚩

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Large Method test_alt_geometry.cpp: TEST:alt_geometry:intersects
  • Code Duplication test_alt_geometry.cpp
  • Large Method test_alt_geometry.cpp: TEST:alt_geometry:within
  • Deep, Nested Complexity alt_geometry.cpp: intersects
  • Lines of Code in a Single File test_alt_geometry.cpp
  • Overall Function Size test_alt_geometry.cpp
  • Overall Code Complexity test_alt_geometry.cpp
  • Large Method test_alt_geometry.cpp: TEST:alt_geometry:distance
  • Large Method test_alt_geometry.cpp: TEST:alt_geometry:coveredBy
  • Large Method test_alt_geometry.cpp: TEST:alt_geometry:disjoint
  • Bumpy Road Ahead alt_geometry.cpp: intersects
  • Deep, Nested Complexity test_alt_geometry.cpp: TEST:alt_geometry:coveredByConcaveRand
  • Deep, Nested Complexity test_alt_geometry.cpp: TEST:alt_geometry:touchesConcaveRand
  • Complex Method alt_geometry.cpp: within
  • Complex Method alt_geometry.cpp: intersects
  • Deep, Nested Complexity test_alt_geometry.cpp: TEST:alt_geometry:disjointConcaveRand
  • Deep, Nested Complexity test_alt_geometry.cpp: TEST:alt_geometry:intersectsConcaveRand
  • Deep, Nested Complexity test_alt_geometry.cpp: TEST:alt_geometry:withinPolygonConcaveRand
  • Complex Method test_alt_geometry.cpp: TEST:alt_geometry:touchesConcaveRand
  • Complex Method test_alt_geometry.cpp: TEST:alt_geometry:coveredByConcaveRand
  • Bumpy Road Ahead alt_geometry.cpp: intersects
  • Bumpy Road Ahead alt_geometry.cpp: within
  • Bumpy Road Ahead test_alt_geometry.cpp: TEST:alt_geometry:areaConcaveRand
  • Bumpy Road Ahead test_alt_geometry.cpp: TEST:alt_geometry:coveredByConcaveRand
  • Bumpy Road Ahead test_alt_geometry.cpp: TEST:alt_geometry:disjointConcaveRand
  • Bumpy Road Ahead test_alt_geometry.cpp: TEST:alt_geometry:intersectsConcaveRand
  • Bumpy Road Ahead test_alt_geometry.cpp: TEST:alt_geometry:touchesConcaveRand
  • Bumpy Road Ahead test_alt_geometry.cpp: TEST:alt_geometry:withinPolygonConcaveRand

Annotations

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

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

within increases in cyclomatic complexity from 14 to 15, 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 470 in common/autoware_universe_utils/src/geometry/alt_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

intersects has a cyclomatic complexity of 15, 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 470 in common/autoware_universe_utils/src/geometry/alt_geometry.cpp

See this annotation in the file changed.

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

❌ Getting worse: Bumpy Road Ahead

intersects increases from 2 to 5 logical blocks with deeply nested code, threshold is one single 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 477 in common/autoware_universe_utils/src/geometry/alt_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 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 728 in common/autoware_universe_utils/src/geometry/alt_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/src/geometry/alt_geometry.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.50 to 4.56, 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.

Check warning on line 470 in common/autoware_universe_utils/src/geometry/alt_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

intersects has a nested complexity depth of 4, 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 1 in common/autoware_universe_utils/test/src/geometry/test_alt_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Lines of Code in a Single File

This module has 1703 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 1 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:areaConcaveRand,TEST:alt_geometry:areaRand,TEST:alt_geometry:coveredByConcaveRand,TEST:alt_geometry:disjointConcaveRand and 3 more functions. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 1 in common/autoware_universe_utils/test/src/geometry/test_alt_geometry.cpp

See this annotation in the file changed.

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

❌ New issue: Overall Function Size

The median function size in this module is 61.0 LOC, threshold = 50.0. This file contains overly long functions, measured by their lines of code.

Check warning on line 1927 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:touchesConcaveRand 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 1529 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:coveredByConcaveRand 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 824 in common/autoware_universe_utils/test/src/geometry/test_alt_geometry.cpp

See this annotation in the file changed.

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

❌ Getting worse: Large Method

TEST:alt_geometry:intersects increases from 120 to 248 lines of code, 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 1267 in common/autoware_universe_utils/test/src/geometry/test_alt_geometry.cpp

See this annotation in the file changed.

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

❌ Getting worse: Large Method

TEST:alt_geometry:within increases from 75 to 223 lines of code, 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 468 in common/autoware_universe_utils/test/src/geometry/test_alt_geometry.cpp

See this annotation in the file changed.

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

❌ Getting worse: Large Method

TEST:alt_geometry:distance increases from 73 to 106 lines of code, 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 229 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:coveredBy 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 325 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:disjoint has 77 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 1347 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:areaConcaveRand 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 1529 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:coveredByConcaveRand 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 1661 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:disjointConcaveRand 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 1793 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:intersectsConcaveRand 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 1927 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:touchesConcaveRand 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 2034 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:withinPolygonConcaveRand 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 1 in common/autoware_universe_utils/test/src/geometry/test_alt_geometry.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.54 across 26 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 1529 in common/autoware_universe_utils/test/src/geometry/test_alt_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:alt_geometry:coveredByConcaveRand 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.