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

Codecheck fixes #730

Merged
merged 3 commits into from
Oct 14, 2021
Merged

Codecheck fixes #730

merged 3 commits into from
Oct 14, 2021

Conversation

scpeters
Copy link
Member

🦟 Bug fix

Fixes some make codecheck issues with newer cppcheck

Summary

There are a few issues printed by make codecheck without generating a failure. I noticed this on macOS, which has a newer cppcheck from brew. I've fixed a few of those complaints here:

  • 65dfd6f: pass by const reference in more places
  • e955699: remove unused variable
  • dcf1422: simplify redundant logic. There are a few places where we return early if a pointer is nullptr, but we continue to check its value. This eliminates those redundant checks, and moves an unreachable console error message to the appropriate place.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
@github-actions github-actions bot added the 🏢 edifice Ignition Edifice label Oct 14, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #730 (dcf1422) into sdf11 (bf3cbef) will increase coverage by 0.02%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            sdf11     #730      +/-   ##
==========================================
+ Coverage   88.09%   88.12%   +0.02%     
==========================================
  Files          73       73              
  Lines       11030    11023       -7     
==========================================
- Hits         9717     9714       -3     
+ Misses       1313     1309       -4     
Impacted Files Coverage Δ
src/FrameSemantics.cc 73.90% <ø> (+0.02%) ⬆️
src/parser.cc 85.46% <71.42%> (+0.22%) ⬆️
src/Converter.cc 93.19% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf3cbef...dcf1422. Read the comment docs.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! We could change make codecheck to run on Focal instead of Bionic, which I think should help catching more like this in the future.

@scpeters
Copy link
Member Author

Nice! We could change make codecheck to run on Focal instead of Bionic, which I think should help catching more like this in the future.

that would be nice to parameterize so packages can opt-in when they are ready

@scpeters scpeters merged commit b0f7f4f into gazebosim:sdf11 Oct 14, 2021
@scpeters scpeters deleted the codecheck_fixes branch October 14, 2021 17:03
@osrf-triage
Copy link

This pull request has been mentioned on Gazebo Community. There might be relevant details there:

https://community.gazebosim.org/t/new-ignition-releases-2022-03-25-fortress-edifice-citadel/1343/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏢 edifice Ignition Edifice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants