fix(intersection): stuck stop line generation when ego is over fist conflicting area #4903
CodeScene PR Check
❌ Quality Gates: FAILED
- Declining Code Health: 6 findings(s) 🚩
- Improving Code Health: 2 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
🚩 Negative Code Health Impact (highest to lowest):
- Code Duplication scene_intersection.cpp 🔥
- Complex Method scene_intersection.cpp: IntersectionModule::modifyPathVelocityDetail 🔥
- Complex Conditional scene_intersection.cpp: IntersectionModule::modifyPathVelocityDetail 🔥
- Complex Method util.cpp: generateIntersectionStopLines
- Lines of Code in a Single File util.cpp
- Bumpy Road Ahead scene_intersection.cpp: IntersectionModule::modifyPathVelocityDetail 🔥
✅ Positive Code Health Impact (highest to lowest):
- Lines of Code in a Single File scene_intersection.cpp 🔥
- Excess Number of Function Arguments scene_intersection.cpp: prepareRTCByDecisionResult 🔥
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Conditional
IntersectionModule::modifyPathVelocityDetail increases from 2 complex conditionals with 5 branches to 2 complex conditionals with 6 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 1 in planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Lines of Code in a Single File
The lines of code decreases from 1329 to 1323, 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)
✅ Getting better: Excess Number of Function Arguments
prepareRTCByDecisionResult decreases from 7 to 6 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: Excess Number of Function Arguments
prepareRTCByDecisionResult has 6 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: Excess Number of Function Arguments
prepareRTCByDecisionResult has 6 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: Excess Number of Function Arguments
prepareRTCByDecisionResult has 6 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: Excess Number of Function Arguments
prepareRTCByDecisionResult has 6 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: Excess Number of Function Arguments
prepareRTCByDecisionResult has 6 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: Excess Number of Function Arguments
prepareRTCByDecisionResult has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 1 in planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 7.73 to 7.77, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Bumpy Road Ahead
IntersectionModule::modifyPathVelocityDetail increases from 4 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Method
IntersectionModule::modifyPathVelocityDetail increases in cyclomatic complexity from 45 to 49, 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)
❌ Getting worse: Code Duplication
introduced similar code in: reactRTCApprovalByDecisionResult,reactRTCApprovalByDecisionResult. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check notice on line 1 in planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Primitive Obsession
The ratio of primitive types in function arguments increases from 30.88% to 43.56%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.
Check warning on line 1 in planning/behavior_velocity_intersection_module/src/util.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Lines of Code in a Single File
This module has 1004 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 372 in planning/behavior_velocity_intersection_module/src/util.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Method
generateIntersectionStopLines increases in cyclomatic complexity from 13 to 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 notice on line 399 in planning/behavior_velocity_intersection_module/src/util.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Bumpy Road Ahead
getFirstPointInsidePolygon increases from 2 to 4 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 notice on line 1 in planning/behavior_velocity_intersection_module/src/util.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 7.20 to 7.53, 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.