sdformat icon indicating copy to clipboard operation
sdformat copied to clipboard

ParamPassing: sdfwarns to sdf::Errors when warnings policy set to sdf::EnforcementPolicy::ERR

Open marcoag opened this issue 2 years ago • 1 comments

Signed-off-by: Marco A. Gutierrez [email protected]

🎉 New feature

Work towards https://github.com/gazebosim/sdformat/issues/820.

Summary

Makes warnings to be reported through sdf::Errors when the warnings policy is set to sdf::EnforcementPolicy::ERR in the ParamPassing class .

Since the tests added here directly test the specific messages on the specific functions of the ParamPassing class, they have been added to ParamPassing_TEST.cc instead of the integration test error_output.cc, but let me know if you think it's should be different.

Test it

When using the ParamPassing class and setting the warnings policy to sdf::EnforcementPolicy::ERR warnings should be reported through in the sdf::Errors structure, they should be printed if the policy is different.

Checklist

  • [x] Signed all commits for DCO
  • [x] Added tests
  • [ ] Added example and/or tutorial
  • [ ] Updated documentation (as needed)
  • [ ] Updated migration guide (as needed)
  • [ ] Consider updating Python bindings (if the library has them)
  • [x] codecheck passed (See contributing)
  • [x] 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 and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

marcoag avatar Sep 08 '22 20:09 marcoag

Codecov Report

Merging #1135 (adbd692) into sdf13 (8fcbe1e) will decrease coverage by 0.00%. The diff coverage is 95.45%.

:exclamation: Current head adbd692 differs from pull request most recent head c0b907d. Consider uploading reports for the commit c0b907d to get more accurate results

@@            Coverage Diff             @@
##            sdf13    #1135      +/-   ##
==========================================
- Coverage   87.53%   87.53%   -0.01%     
==========================================
  Files         124      124              
  Lines       16143    16144       +1     
==========================================
  Hits        14131    14131              
- Misses       2012     2013       +1     
Impacted Files Coverage Δ
src/ParamPassing.cc 97.08% <95.45%> (-0.32%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Sep 14 '22 14:09 codecov[bot]