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_pid_longitudinal_controller): fix bugprone-branch-clone #9629

Merged
merged 1 commit into from
Dec 12, 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/control/autoware_pid_longitudinal_controller/src/smooth_stop.cpp:143:79: error: repeated branch in conditional chain [bugprone-branch-clone,-warnings-as-errors]
    if (time_to_stop && *time_to_stop > m_params.weak_stop_time + delay_time) {
                                                                              ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/control/autoware_pid_longitudinal_controller/src/smooth_stop.cpp:145:6: note: end of the original
    } else if (!time_to_stop && is_fast_vel) {
     ^
/home/emb4/autoware/autoware/src/universe/autoware.universe/control/autoware_pid_longitudinal_controller/src/smooth_stop.cpp:145:46: note: clone 1 starts here
    } else if (!time_to_stop && is_fast_vel) {
                                             ^

Related links

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:control Vehicle control algorithms and mechanisms. (auto-assigned) label Dec 12, 2024
Copy link

Thank you for contributing to the Autoware project!

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

Please ensure:

@kobayu858 kobayu858 marked this pull request as draft December 12, 2024 05:19
@kobayu858 kobayu858 marked this pull request as ready for review December 12, 2024 05:32
@kobayu858 kobayu858 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 12, 2024
@kobayu858 kobayu858 requested a review from veqcc December 12, 2024 05:32
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 29.56%. Comparing base (e30350c) to head (19c819a).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...re_pid_longitudinal_controller/src/smooth_stop.cpp 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9629      +/-   ##
==========================================
- Coverage   29.56%   29.56%   -0.01%     
==========================================
  Files        1441     1441              
  Lines      108348   108364      +16     
  Branches    41376    41379       +3     
==========================================
+ Hits        32032    32034       +2     
- Misses      73206    73220      +14     
  Partials     3110     3110              
Flag Coverage Δ *Carryforward flag
differential 32.37% <50.00%> (?)
total 29.56% <ø> (+<0.01%) ⬆️ Carriedforward from e30350c

*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 kobayu858 merged commit 413805a into autowarefoundation:main Dec 12, 2024
43 of 46 checks passed
kyoichi-sugahara pushed a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:control Vehicle control algorithms and mechanisms. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants