fix(intersection): fix/formalize pass judge behavior #5272
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 1 findings(s) 🚩
- Improving Code Health: 4 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Lightweight sanity check
View detailed results in CodeScene
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method scene_intersection.cpp: IntersectionModule::modifyPathVelocityDetail 🔥
✅ Improving Code Health:
- Lines of Code in a Single File util.cpp
- Overall Code Complexity util.cpp
- Complex Method util.cpp: generateIntersectionStopLines
- Complex Conditional scene_intersection.cpp: IntersectionModule::modifyPathVelocityDetail 🔥
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Complex Conditional
IntersectionModule::modifyPathVelocityDetail decreases from 2 complex conditionals with 6 branches to 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 notice on line 1 in planning/behavior_velocity_intersection_module/src/scene_intersection.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1625 to 1630, 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 worse: Complex Method
IntersectionModule::modifyPathVelocityDetail already has high cyclomatic complexity, and now it increases in Lines of Code from 295 to 301. 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_velocity_intersection_module/src/util.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Lines of Code in a Single File
The lines of code decreases from 1179 to 1175, 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 441 in planning/behavior_velocity_intersection_module/src/util.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Complex Method
generateIntersectionStopLines decreases in cyclomatic complexity from 20 to 18, 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_velocity_intersection_module/src/util.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 7.19 to 7.14, 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.