CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 11 findings(s) 🚩
- Improving Code Health: 4 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 Conditional scene.cpp: DynamicAvoidanceModule::determineWhetherToAvoidAgainstLaneDriveObjects 🔥
- Complex Method scene.cpp: DynamicAvoidanceModule::determineWhetherToAvoidAgainstLaneDriveObjects 🔥
- Complex Method scene.cpp: DynamicAvoidanceModule::determineWhetherToAvoidAgainstFreeRunObjects 🔥
- Complex Method scene.cpp: DynamicAvoidanceModule::registerLaneDriveObjects 🔥
- Complex Method scene.cpp: DynamicAvoidanceModule::getLabelAsTargetObstacle 🔥
- Complex Method scene.cpp: DynamicAvoidanceModule::registerFreeRunObjects 🔥
- Complex Conditional scene.cpp: DynamicAvoidanceModule::determineWhetherToAvoidAgainstFreeRunObjects 🔥
- Bumpy Road Ahead scene.cpp: DynamicAvoidanceModule::registerLaneDriveObjects 🔥
- Bumpy Road Ahead scene.cpp: DynamicAvoidanceModule::registerFreeRunObjects 🔥
- Bumpy Road Ahead scene.cpp: DynamicAvoidanceModule::determineWhetherToAvoidAgainstLaneDriveObjects 🔥
- Bumpy Road Ahead scene.cpp: DynamicAvoidanceModule::determineWhetherToAvoidAgainstFreeRunObjects 🔥
✅ Improving Code Health:
- Complex Conditional scene.cpp: DynamicAvoidanceModule::updateTargetObjects 🔥
- Complex Method scene.cpp: DynamicAvoidanceModule::updateTargetObjects 🔥
- Complex Method scene.cpp: DynamicAvoidanceModule::isLabelTargetObstacle 🔥
- Bumpy Road Ahead scene.cpp: DynamicAvoidanceModule::updateTargetObjects 🔥
Annotations
Check notice on line 1 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1163 to 1341, 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 notice on line 915 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
DynamicAvoidanceModule::updateTargetObjects is no longer above the threshold for cyclomatic complexity. 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 456 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
DynamicAvoidanceModule::isLabelTargetObstacle is no longer above the threshold for cyclomatic complexity. 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 800 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
DynamicAvoidanceModule::determineWhetherToAvoidAgainstLaneDriveObjects 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.
Check warning on line 915 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
DynamicAvoidanceModule::determineWhetherToAvoidAgainstFreeRunObjects has a cyclomatic complexity of 21, 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 552 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
DynamicAvoidanceModule::registerLaneDriveObjects has a cyclomatic complexity of 19, 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 456 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
DynamicAvoidanceModule::getLabelAsTargetObstacle has a cyclomatic complexity of 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 641 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
DynamicAvoidanceModule::registerFreeRunObjects 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 notice on line 1 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Conditional
DynamicAvoidanceModule::updateTargetObjects no longer has a complex conditional. 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/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
DynamicAvoidanceModule::determineWhetherToAvoidAgainstLaneDriveObjects has 2 complex conditionals with 5 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 834 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
DynamicAvoidanceModule::determineWhetherToAvoidAgainstFreeRunObjects 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 notice on line 915 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
DynamicAvoidanceModule::updateTargetObjects is no longer above the threshold for logical blocks with deeply nested code. 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 552 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
DynamicAvoidanceModule::registerLaneDriveObjects 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 641 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
DynamicAvoidanceModule::registerFreeRunObjects 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 800 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
DynamicAvoidanceModule::determineWhetherToAvoidAgainstLaneDriveObjects 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 915 in planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
DynamicAvoidanceModule::determineWhetherToAvoidAgainstFreeRunObjects 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 planning/behavior_path_dynamic_avoidance_module/src/scene.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 6.13 to 6.60, 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.