refactor(behavior_path_planner): separate drivable area functions #5604
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 39 findings(s) 🚩
- Improving Code Health: 40 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method static_drivable_area.cpp: makeBoundLongitudinallyMonotonic
- Complex Method static_drivable_area.cpp: generateDrivableArea
- Complex Method static_drivable_area.cpp: getBoundWithIntersectionAreas
- Lines of Code in a Single File static_drivable_area.cpp
- Overall Code Complexity static_drivable_area.cpp
- Complex Method static_drivable_area.cpp: generatePolygonInsideBounds
- Bumpy Road Ahead static_drivable_area.cpp: makeBoundLongitudinallyMonotonic
- Complex Method static_drivable_area.cpp: concatenateTwoPolygons
- Complex Conditional static_drivable_area.cpp: generatePolygonInsideBounds
- Complex Conditional static_drivable_area.cpp: concatenateTwoPolygons
- Bumpy Road Ahead static_drivable_area.cpp: generateDrivableArea
- Complex Method static_drivable_area.cpp: cutOverlappedLanes
- Bumpy Road Ahead static_drivable_area.cpp: getBoundWithHatchedRoadMarkings
- Deep, Nested Complexity static_drivable_area.cpp: concatenatePolygons
- Complex Method static_drivable_area.cpp: combineDrivableLanes
- Complex Method static_drivable_area.cpp: generateDrivableArea
- Complex Method static_drivable_area.cpp: getBoundWithHatchedRoadMarkings
- Complex Conditional static_drivable_area.cpp: generateDrivableArea
- Primitive Obsession utils.cpp 🔥
- Complex Method static_drivable_area.cpp: extractObstaclesFromDrivableArea
- Deep, Nested Complexity static_drivable_area.cpp: getBoundWithHatchedRoadMarkings
- Deep, Nested Complexity static_drivable_area.cpp: makeBoundLongitudinallyMonotonic
- Deep, Nested Complexity static_drivable_area.cpp: combineDrivableLanes
- Complex Method static_drivable_area.cpp: calcBound
- Complex Method static_drivable_area.cpp: getOverlappedLaneletId
- Complex Method static_drivable_area.cpp: getPolygonPointsInsideBounds
- Complex Method static_drivable_area.cpp: concatenatePolygons
- Bumpy Road Ahead static_drivable_area.cpp: generatePolygonInsideBounds
- Bumpy Road Ahead static_drivable_area.cpp: concatenateTwoPolygons
- Bumpy Road Ahead static_drivable_area.cpp: generateDrivableArea
- Bumpy Road Ahead static_drivable_area.cpp: getBoundWithIntersectionAreas
- Bumpy Road Ahead static_drivable_area.cpp: getPolygonPointsInsideBounds
- Bumpy Road Ahead static_drivable_area.cpp: getOverlappedLaneletId
- Bumpy Road Ahead static_drivable_area.cpp: cutOverlappedLanes
- Bumpy Road Ahead static_drivable_area.cpp: extractObstaclesFromDrivableArea
- Bumpy Road Ahead static_drivable_area.cpp: combineDrivableLanes
- Excess Number of Function Arguments static_drivable_area.cpp: generateDrivableArea
- Excess Number of Function Arguments static_drivable_area.cpp: intersectBound
- Excess Number of Function Arguments static_drivable_area.cpp: calcBound
✅ Improving Code Health:
- Overall Code Complexity path_utils.cpp
- Lines of Code in a Single File utils.cpp 🔥
- Overall Code Complexity utils.cpp 🔥
- Complex Conditional utils.cpp: generatePolygonInsideBounds 🔥
- Complex Conditional utils.cpp: concatenateTwoPolygons 🔥
- Complex Conditional utils.cpp: generateDrivableArea 🔥
- Deep, Nested Complexity utils.cpp: concatenatePolygons 🔥
- Deep, Nested Complexity utils.cpp: getBoundWithHatchedRoadMarkings 🔥
- Deep, Nested Complexity utils.cpp: makeBoundLongitudinallyMonotonic 🔥
- Deep, Nested Complexity utils.cpp: combineDrivableLanes 🔥
- Complex Method utils.cpp: makeBoundLongitudinallyMonotonic 🔥
- Complex Method utils.cpp: generateDrivableArea 🔥
- Complex Method utils.cpp: getBoundWithIntersectionAreas 🔥
- Complex Method utils.cpp: generatePolygonInsideBounds 🔥
- Complex Method utils.cpp: concatenateTwoPolygons 🔥
- Complex Method utils.cpp: cutOverlappedLanes 🔥
- Complex Method utils.cpp: combineDrivableLanes 🔥
- Complex Method utils.cpp: generateDrivableArea 🔥
- Complex Method utils.cpp: getBoundWithHatchedRoadMarkings 🔥
- Complex Method utils.cpp: extractObstaclesFromDrivableArea 🔥
- Complex Method utils.cpp: calcBound 🔥
- Complex Method utils.cpp: getOverlappedLaneletId 🔥
- Complex Method utils.cpp: getPolygonPointsInsideBounds 🔥
- Complex Method utils.cpp: concatenatePolygons 🔥
- Bumpy Road Ahead utils.cpp: makeBoundLongitudinallyMonotonic 🔥
- Bumpy Road Ahead utils.cpp: generateDrivableArea 🔥
- Bumpy Road Ahead utils.cpp: getBoundWithHatchedRoadMarkings 🔥
- Bumpy Road Ahead utils.cpp: generatePolygonInsideBounds 🔥
- Bumpy Road Ahead utils.cpp: concatenateTwoPolygons 🔥
- Bumpy Road Ahead utils.cpp: getBoundWithIntersectionAreas 🔥
- Bumpy Road Ahead utils.cpp: generateDrivableArea 🔥
- Bumpy Road Ahead utils.cpp: getPolygonPointsInsideBounds 🔥
- Bumpy Road Ahead utils.cpp: getOverlappedLaneletId 🔥
- Bumpy Road Ahead utils.cpp: cutOverlappedLanes 🔥
- Bumpy Road Ahead utils.cpp: combineDrivableLanes 🔥
- Bumpy Road Ahead utils.cpp: extractObstaclesFromDrivableArea 🔥
- Excess Number of Function Arguments utils.cpp: intersectBound 🔥
- Excess Number of Function Arguments utils.cpp: generateDrivableArea 🔥
- Excess Number of Function Arguments utils.cpp: calcBound 🔥
- Number of Functions in a Single Module utils.cpp 🔥
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Lines of Code in a Single File
This module has 1458 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
makeBoundLongitudinallyMonotonic has a cyclomatic complexity of 52, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
generateDrivableArea has a cyclomatic complexity of 34, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
getBoundWithIntersectionAreas has a cyclomatic complexity of 30, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
generatePolygonInsideBounds has a cyclomatic complexity of 24, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
concatenateTwoPolygons has a cyclomatic complexity of 20, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
cutOverlappedLanes 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
combineDrivableLanes 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
generateDrivableArea 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
getBoundWithHatchedRoadMarkings has a cyclomatic complexity of 13, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
extractObstaclesFromDrivableArea has a cyclomatic complexity of 12, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
calcBound has a cyclomatic complexity of 10, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
getOverlappedLaneletId 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
getPolygonPointsInsideBounds 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
concatenatePolygons 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
generatePolygonInsideBounds 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
concatenateTwoPolygons 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
generateDrivableArea has 1 complex conditionals with 2 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
makeBoundLongitudinallyMonotonic has 8 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
generateDrivableArea has 6 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
getBoundWithHatchedRoadMarkings has 5 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
generatePolygonInsideBounds 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
concatenateTwoPolygons 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
generateDrivableArea 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
getBoundWithIntersectionAreas 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.