refactor(departure_checker): move lane departure checker class to departure_checker #10337
CodeScene PR Check
Quality Gate Failed
Code Health Improved
(1 files improve in Code Health)
Gates Failed
New code is healthy
(1 new file with code health below 9.00)
Enforce critical code health rules
(1 file with Bumpy Road Ahead, Deep, Nested Complexity)
Enforce advisory code health rules
(2 files with Excess Number of Function Arguments, Code Duplication)
Gates Passed
1 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
New code is healthy | Violations | Code Health Impact | |
---|---|---|---|
boundary_departure_checker.cpp | 3 rules | 10.00 → 8.96 | Suppress |
Enforce critical code health rules | Violations | Code Health Impact | |
---|---|---|---|
boundary_departure_checker.cpp | 2 critical rules | 10.00 → 8.96 | Suppress |
Enforce advisory code health rules | Violations | Code Health Impact | |
---|---|---|---|
boundary_departure_checker.cpp | 1 advisory rule | 10.00 → 8.96 | Suppress |
test_create_vehicle_footprints.cpp | 1 advisory rule | 10.00 → 9.39 | Suppress |
View Improvements
File | Code Health Impact | Categories Improved |
---|---|---|
lane_departure_checker_node.cpp | 6.10 → 6.32 | Complex Conditional, Overall Code Complexity |
Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
Details
🚩 Declining Code Health (highest to lowest):
- Deep, Nested Complexity boundary_departure_checker.cpp: LaneDepartureChecker::extractUncrossableBoundaries
- Code Duplication test_create_vehicle_footprints.cpp
- Excess Number of Function Arguments boundary_departure_checker.cpp: LaneDepartureChecker::cropPointsOutsideOfLanes
- Bumpy Road Ahead boundary_departure_checker.cpp: LaneDepartureChecker::extractUncrossableBoundaries
✅ Improving Code Health:
- Overall Code Complexity lane_departure_checker_node.cpp
- Complex Conditional lane_departure_checker_node.cpp: LaneDepartureCheckerNode::checkTrajectoryDeviation
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Conditional
LaneDepartureCheckerNode::checkTrajectoryDeviation no longer has a complex conditional
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 5.42 to 5.33, 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)
❌ New issue: Bumpy Road Ahead
LaneDepartureChecker::extractUncrossableBoundaries 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
LaneDepartureChecker::extractUncrossableBoundaries 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
LaneDepartureChecker::cropPointsOutsideOfLanes 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: Code Duplication
The module contains 2 functions with similar structure: TEST_P,TEST_P. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.