-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add a codecheck make target #682
Conversation
Utilizes ignition-cmake's IgnCodecheck module to create the codecheck target. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## sdf9 #682 +/- ##
=======================================
Coverage 86.84% 86.84%
=======================================
Files 62 62
Lines 9738 9738
=======================================
Hits 8457 8457
Misses 1281 1281
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I tested it with gazebosim/gz-cmake#186 and had no issues. I just have one minor question.
cmake/SearchForStuff.cmake
Outdated
# Find ignition cmake2 | ||
# Only for using the testing macros and creating the codecheck target, not | ||
# really being use to configure the whole project | ||
find_package(ignition-cmake2 2.3 REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason why version 2.3
is the minimum required version? It looks like ign_setup_target_for_codecheck
exists before 2.3
: https://github.com/ignitionrobotics/ign-cmake/blob/ignition-cmake2_2.2.0/cmake/IgnCodeCheck.cmake#L1-L2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will actually need to be updated since this PR needs a new release of ign-cmake to ensure make codecheck
is clean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't add that as a version requirement, since that will cause build failures if people have an outdated version of ign-cmake, which is a bit extreme to ensure correct linting. I would recommend a find_package
call with no version requirement, since IgnCodeCheck
was present in ign-cmake's 2.0.0 release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point; I think I agree with @scpeters comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. If it won't cause failure in CI, since we assume CI will have the latest ign-cmake, we can remove the version requirement.
Also, I originally thought gazebosim/gz-cmake#187 would be needed to make CI pass, but it turns out without that PR, we do get output from codechech, but they are just warnings, not errors. So technically, this PR can go in without the ign-cmake release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@osrf-jenkins run test |
🎉 New feature
Summary
Follow up from #680 (comment)
Utilizes ignition-cmake's IgnCodecheck module to create a
codecheck
target.Needs gazebosim/gz-cmake#186 to eliminate some false positives.
Test it
Run
make codecheck
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge