feat(trajectory_selector): combine validator and concatenator#12532
CodeScene PR Check
Quality Gate Failed
Gates Failed
Enforce critical code health rules
(1 file with Bumpy Road Ahead)
Enforce advisory code health rules
(2 files with Complex Method, Code Duplication)
Gates Passed
2 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce critical code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| trajectory_validator_wrapper.cpp | 1 critical rule | 9.54 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| test_trajectory_selector_node.cpp | 1 advisory rule | 10.00 → 9.39 | Suppress |
| trajectory_validator_wrapper.cpp | 1 advisory rule | 9.54 | Suppress |
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Details
🚩 Declining Code Health (highest to lowest):
- Code Duplication test_trajectory_selector_node.cpp
- Complex Method trajectory_validator_wrapper.cpp: TrajectoryValidatorWrapper::publish_plugins_report_text
- Bumpy Road Ahead trajectory_validator_wrapper.cpp: TrajectoryValidatorWrapper::publish_plugins_report_text
✅ Improving Code Health:
- Deep, Nested Complexity trajectory_validator.cpp: ValidationStage::process
- Complex Method trajectory_validator.cpp: ValidationStage::process
- Bumpy Road Ahead trajectory_validator.cpp: ValidationStage::process
Annotations
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Complex Method
ValidationStage::process 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Bumpy Road Ahead
ValidationStage::process 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.
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Deep, Nested Complexity
ValidationStage::process is no longer above the threshold for nested complexity depth. 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 Code Health Review (main)
❌ New issue: Complex Method
TrajectoryValidatorWrapper::publish_plugins_report_text has a cyclomatic complexity of 9, 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 Code Health Review (main)
❌ New issue: Bumpy Road Ahead
TrajectoryValidatorWrapper::publish_plugins_report_text has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is 2 blocks 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 Code Health Review (main)
❌ New issue: Code Duplication
The module contains 3 functions with similar structure: TEST:TrajectorySelectorNodeTest:NoPublishWhenAccelerationMissing,TEST:TrajectorySelectorNodeTest:NoPublishWhenObjectsMissing,TEST:TrajectorySelectorNodeTest:NoPublishWhenOdometryMissing. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.