fix(clang-tidy): re-enable bugprone-unused-local-non-trivial-variable#12563
Open
vish0012 wants to merge 4 commits intoautowarefoundation:mainfrom
Open
fix(clang-tidy): re-enable bugprone-unused-local-non-trivial-variable#12563vish0012 wants to merge 4 commits intoautowarefoundation:mainfrom
vish0012 wants to merge 4 commits intoautowarefoundation:mainfrom
Conversation
Re-enables bugprone-unused-local-non-trivial-variable in .clang-tidy-ci. The check was suppressed in autowarefoundation#12431 with 2 reported errors. This PR addresses both: - autoware_manual_lane_change_handler: 'shift_unavailable_reason' was computed but never used in the subsequent log message. The fix appends it to the RCLCPP_INFO_STREAM so the log now reports the actual reason. - autoware_behavior_path_side_shift_module: 'centerline_path' (line 211 of scene.cpp) was computed via utils::calcCenterLinePath but never used anywhere in the package. Dating from 2023, it appears to be leftover from a refactor. Removed the dead call. Refs autowarefoundation#12450 Signed-off-by: Vishal Chauhan <40782713+vish0012@users.noreply.github.com>
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Signed-off-by: Vishal Chauhan <40782713+vish0012@users.noreply.github.com>
Signed-off-by: Vishal Chauhan <40782713+vish0012@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-enables
bugprone-unused-local-non-trivial-variablein.clang-tidy-ci.The check was suppressed in #12431 with 2 reported errors. This PR fixes both.
Refs #12450
Fixes
autoware_manual_lane_change_handlershift_unavailable_reasonwas computed but never used. Added it to the existingRCLCPP_INFO_STREAMlog so the message now reports why the shift was unavailable.autoware_behavior_path_side_shift_modulecenterline_pathinscene.cppwas computed but never used anywhere in the package. Removed the dead call.How to reproduce
Result
Before: 2 errors
After: 0 errors