feat(path_generator): add path_generator package #9216
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Code Health of new files: 7.90
- Declining Code Health: 8 findings(s) 🚩
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method node.cpp: PathGenerator::generate_path
- Bumpy Road Ahead node.cpp: PathGenerator::generate_path
- Overall Code Complexity node.cpp
- Deep, Nested Complexity node.cpp: PathGenerator::generate_path
- Code Duplication utils.cpp
- Overall Code Complexity utils.cpp
- Complex Conditional utils.cpp: get_next_lanelet_within_route
- Excess Number of Function Arguments utils.cpp: get_lanelets_within_route
Annotations
Check warning on line 363 in planning/autoware_path_generator/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
PathGenerator::generate_path has a cyclomatic complexity of 27, 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 363 in planning/autoware_path_generator/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
PathGenerator::generate_path 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.
Check warning on line 1 in planning/autoware_path_generator/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 5.45 across 11 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 363 in planning/autoware_path_generator/src/node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
PathGenerator::generate_path has a nested complexity depth of 6, 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 90 in planning/autoware_path_generator/src/utils.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: get_lanelets_within_route_after,get_lanelets_within_route_up_to. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check warning on line 160 in planning/autoware_path_generator/src/utils.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
get_next_lanelet_within_route 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.
Check warning on line 1 in planning/autoware_path_generator/src/utils.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.71 across 7 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 64 in planning/autoware_path_generator/src/utils.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
get_lanelets_within_route has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.