Skip to content

Commit

Permalink
Add WARN
Browse files Browse the repository at this point in the history
Signed-off-by: Zulfaqar Azmi <[email protected]>
  • Loading branch information
zulfaqar-azmi-t4 committed May 31, 2024
1 parent 36a17f4 commit 6458500
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions planning/behavior_path_lane_change_module/src/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ bool LaneChangeInterface::canTransitFailureState()
log_debug_throttled(__func__);

if (getPreviousModuleOutput().path.points.empty()) {
RCLCPP_WARN(
getLogger(), "Previous output path is empty. Some module might accidentally reset it.");
return true;
}

Check warning on line 233 in planning/behavior_path_lane_change_module/src/interface.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

LaneChangeInterface::canTransitFailureState increases in cyclomatic complexity from 15 to 16, 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.
Expand Down

0 comments on commit 6458500

Please sign in to comment.