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_motion_velocity_obstacle_velocity_limiter_module): fix functionStatic #8483

Merged

Conversation

kobayu858
Copy link
Contributor

Description

This is a fix based on cppcheck functionStatic warnings.

Since each function clearly changes its member variables, it is assumed to be a false positive for cppcheck.
I believe the reason for the false positive is that the function mechanism itself does not depend on the member variables.

planning/motion_velocity_planner/autoware_motion_velocity_obstacle_velocity_limiter_module/src/parameters.hpp:73:8: performance: inconclusive: Technically the member function 'autoware::motion_velocity_planner::obstacle_velocity_limiter::ObstacleParameters::updateType' can be static (but you may consider moving to unnamed namespace). [functionStatic]
  bool updateType(const rclcpp::Logger & logger, const std::string & type)
       ^

planning/motion_velocity_planner/autoware_motion_velocity_obstacle_velocity_limiter_module/src/parameters.hpp:143:8: performance: inconclusive: Technically the member function 'autoware::motion_velocity_planner::obstacle_velocity_limiter::ProjectionParameters::updateModel' can be static (but you may consider moving to unnamed namespace). [functionStatic]
  bool updateModel(const rclcpp::Logger & logger, const std::string & model_str)
       ^

planning/motion_velocity_planner/autoware_motion_velocity_obstacle_velocity_limiter_module/src/parameters.hpp:157:8: performance: inconclusive: Technically the member function 'autoware::motion_velocity_planner::obstacle_velocity_limiter::ProjectionParameters::updateDistanceMethod' can be static (but you may consider moving to unnamed namespace). [functionStatic]
  bool updateDistanceMethod(const rclcpp::Logger & logger, const std::string & method_str)
       ^

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 Aug 15, 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:

@maxime-clem maxime-clem added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 15, 2024
@kobayu858 kobayu858 requested a review from veqcc August 15, 2024 05:55
Copy link

codecov bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 23.89%. Comparing base (1f32972) to head (83d41dc).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8483      +/-   ##
==========================================
+ Coverage   23.88%   23.89%   +0.01%     
==========================================
  Files        1380     1385       +5     
  Lines      101833   101847      +14     
  Branches    38776    38764      -12     
==========================================
+ Hits        24320    24334      +14     
- Misses      75009    75050      +41     
+ Partials     2504     2463      -41     
Flag Coverage Δ *Carryforward flag
differential 18.16% <ø> (?)
total 23.89% <ø> (+0.01%) ⬆️ Carriedforward from 9d522ea

*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 9fa7cc9 into autowarefoundation:main Aug 15, 2024
38 of 39 checks passed
xtk8532704 pushed a commit to tier4/autoware.universe that referenced this pull request Aug 15, 2024
…unctionStatic (autowarefoundation#8483)

fix:functionStatic

Signed-off-by: kobayu858 <[email protected]>
Signed-off-by: xtk8532704 <[email protected]>
@kobayu858 kobayu858 deleted the fix/cppcheck_functionStatic_pla-1 branch August 21, 2024 06:14
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) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants