Skip to content

feat(trajectory_selector): combine validator and concatenator#12532

Merged
zulfaqar-azmi-t4 merged 25 commits into
autowarefoundation:mainfrom
zulfaqar-azmi-t4:combine_validator_and_concatenator
Jun 5, 2026
Merged

feat(trajectory_selector): combine validator and concatenator#12532
zulfaqar-azmi-t4 merged 25 commits into
autowarefoundation:mainfrom
zulfaqar-azmi-t4:combine_validator_and_concatenator

fix: address minor copilot comment

70a4b91
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (main) failed Jun 5, 2026 in 1m 3s

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

Check notice on line 96 in planning/autoware_trajectory_validator/src/detail/trajectory_validator.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 96 in planning/autoware_trajectory_validator/src/detail/trajectory_validator.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check notice on line 96 in planning/autoware_trajectory_validator/src/detail/trajectory_validator.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 273 in planning/autoware_trajectory_validator/src/trajectory_validator_wrapper.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 273 in planning/autoware_trajectory_validator/src/trajectory_validator_wrapper.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.

Check warning on line 213 in planning/autoware_trajectory_selector/test/node/test_trajectory_selector_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.