Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(autoware_behavior_velocity_intersection_module): fix bugprone-branch-clone #9702

Merged
merged 2 commits into from
Dec 27, 2024

Conversation

kobayu858
Copy link
Contributor

Description

This is a fix based on clang-tidy bugprone-branch-clone error.

/home/emb4/autoware/autoware/src/universe/autoware.universe/planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection.cpp:356:26: error: repeated branch in conditional chain [bugprone-branch-clone,-warnings-as-errors]
      if (over_stopline) {
                         ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection.cpp:358:8: note: end of the original
      } else if (is_stopped_duration && approached_dist_stopline) {
       ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection.cpp:358:67: note: clone 1 starts here
      } else if (is_stopped_duration && approached_dist_stopline) {
                                                                  ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection.cpp:369:24: error: repeated branch in conditional chain [bugprone-branch-clone,-warnings-as-errors]
    if (over_stopline) {
                       ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection.cpp:371:6: note: end of the original
    } else if (is_stopped && approached_dist_stopline) {
     ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/src/scene_intersection.cpp:371:56: note: clone 1 starts here
    } else if (is_stopped && approached_dist_stopline) {
                                                       ^

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Signed-off-by: kobayu858 <[email protected]>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Dec 20, 2024
Copy link

github-actions bot commented Dec 20, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@kobayu858 kobayu858 requested a review from veqcc December 20, 2024 07:50
@kobayu858 kobayu858 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 20, 2024
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 29.70%. Comparing base (cd06f62) to head (ab99f20).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ity_intersection_module/src/scene_intersection.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9702      +/-   ##
==========================================
+ Coverage   28.76%   29.70%   +0.94%     
==========================================
  Files        1456     1450       -6     
  Lines      109131   107737    -1394     
  Branches    42516    42054     -462     
==========================================
+ Hits        31393    32005     +612     
+ Misses      74662    72595    -2067     
- Partials     3076     3137      +61     
Flag Coverage Δ *Carryforward flag
differential 0.17% <0.00%> (?)
total 29.77% <ø> (+1.01%) ⬆️ Carriedforward from 4d39ff1

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kobayu858
Copy link
Contributor Author

@kyoichi-sugahara @soblin @shmpwk @takayuki5168 @tkimura4 @yhisaki
Please confirm the PR. Thank you very much.

@kobayu858 kobayu858 merged commit 869cf4c into autowarefoundation:main Dec 27, 2024
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants