feat(map): add differential lanelet loading #6241
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: -0.68 (9.17 -> 8.50)
- Declining Code Health: 10 findings(s) 🚩
Details
🚩 Declining Code Health (highest to lowest):
- Overall Code Complexity lanelet2_map_loader_node.cpp
- Deep, Nested Complexity lanelet2_map_loader_node.cpp: Lanelet2MapLoaderNode::get_lanelet2_paths
- Complex Method lanelet2_map_loader_node.cpp: Lanelet2MapLoaderNode::on_map_projector_info
- Bumpy Road Ahead lanelet2_map_loader_node.cpp: Lanelet2MapLoaderNode::on_map_projector_info
- Complex Method dynamic_lanelet_provider.cpp: DynamicLaneletProviderNode::updateMap
- Excess Number of Function Arguments dynamic_lanelet_provider.cpp: is_inside_region
- Complex Method lanelet2_differential_loader_module.cpp: Lanelet2DifferentialLoaderModule::differentialLanelet2Load
- Bumpy Road Ahead lanelet2_map_loader_node.cpp: Lanelet2MapLoaderNode::get_lanelet2_paths
- Bumpy Road Ahead dynamic_lanelet_provider.cpp: DynamicLaneletProviderNode::updateMap
- Bumpy Road Ahead lanelet2_differential_loader_module.cpp: Lanelet2DifferentialLoaderModule::differentialLanelet2Load
Annotations
Check warning on line 188 in map/autoware_dynamic_lanelet_provider/src/dynamic_lanelet_provider.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
DynamicLaneletProviderNode::updateMap 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.
Check warning on line 188 in map/autoware_dynamic_lanelet_provider/src/dynamic_lanelet_provider.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
DynamicLaneletProviderNode::updateMap 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 63 in map/autoware_dynamic_lanelet_provider/src/dynamic_lanelet_provider.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
is_inside_region has 5 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: Complex Method
Lanelet2DifferentialLoaderModule::differentialLanelet2Load 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: Bumpy Road Ahead
Lanelet2DifferentialLoaderModule::differentialLanelet2Load 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 162 in map/map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Method
Lanelet2MapLoaderNode::on_map_projector_info increases in cyclomatic complexity from 12 to 17, 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 162 in map/map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Bumpy Road Ahead
Lanelet2MapLoaderNode::on_map_projector_info 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 303 in map/map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
Lanelet2MapLoaderNode::get_lanelet2_paths 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 map/map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 5.50 across 8 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 303 in map/map_loader/src/lanelet2_map_loader/lanelet2_map_loader_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
Lanelet2MapLoaderNode::get_lanelet2_paths 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.