Skip to content

feat: add unit tests for LidarMarkerLocalizer and implement testing f…

d9c9775
Select commit
Loading
Failed to load commit list.
Draft

feat(lidar_marker_localizer): road surface lidar marker extension #11701

feat: add unit tests for LidarMarkerLocalizer and implement testing f…
d9c9775
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Code Health Review (main) failed Feb 18, 2026 in 46s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce critical code health rules (1 file with Deep, Nested Complexity)
Enforce advisory code health rules (1 file with Complex Method, Large Method)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce critical code health rules Violations Code Health Impact
landmark_manager.cpp 1 critical rule 9.84 → 9.39 Suppress
Enforce advisory code health rules Violations Code Health Impact
lidar_marker_localizer.cpp 2 advisory rules 6.85 → 6.15 Suppress

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):

  • Complex Method lidar_marker_localizer.cpp: LidarMarkerLocalizer::detect_landmarks
  • Deep, Nested Complexity landmark_manager.cpp: LandmarkManager::calculate_new_self_pose
  • Large Method lidar_marker_localizer.cpp: LidarMarkerLocalizer::LidarMarkerLocalizer
  • Complex Method lidar_marker_localizer.cpp: LidarMarkerLocalizer::main_process
  • Large Method lidar_marker_localizer.cpp: LidarMarkerLocalizer::save_intensity

✅ Improving Code Health:

  • Bumpy Road Ahead landmark_manager.cpp: LandmarkManager::calculate_new_self_pose

Annotations

Check notice on line 260 in localization/autoware_landmark_based_localizer/autoware_landmark_manager/src/landmark_manager.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

LandmarkManager::calculate_new_self_pose is no longer above the threshold for logical blocks with deeply nested code

Check warning on line 260 in localization/autoware_landmark_based_localizer/autoware_landmark_manager/src/landmark_manager.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Deep, Nested Complexity

LandmarkManager::calculate_new_self_pose 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.

Check warning on line 651 in localization/autoware_landmark_based_localizer/autoware_lidar_marker_localizer/src/lidar_marker_localizer.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ Getting worse: Complex Method

LidarMarkerLocalizer::detect_landmarks increases in cyclomatic complexity from 26 to 37, 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 380 in localization/autoware_landmark_based_localizer/autoware_lidar_marker_localizer/src/lidar_marker_localizer.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ Getting worse: Complex Method

LidarMarkerLocalizer::main_process increases in cyclomatic complexity from 9 to 14, 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 154 in localization/autoware_landmark_based_localizer/autoware_lidar_marker_localizer/src/lidar_marker_localizer.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ Getting worse: Large Method

LidarMarkerLocalizer::LidarMarkerLocalizer increases from 74 to 101 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check warning on line 881 in localization/autoware_landmark_based_localizer/autoware_lidar_marker_localizer/src/lidar_marker_localizer.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Code Health Review (main)

❌ New issue: Large Method

LidarMarkerLocalizer::save_intensity has 80 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.