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

Cppcheck exits with code 0 (success) despite errors #446

Open
shameekganguly opened this issue Aug 24, 2024 · 0 comments
Open

Cppcheck exits with code 0 (success) despite errors #446

shameekganguly opened this issue Aug 24, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@shameekganguly
Copy link

Environment

  • OS Version: All
  • Source build

Description

/github/workspace/include/gz/sim/Conversions.hh:636:7: error: Found a exit path from function with non-void return type that has missing return statement [missingReturn]
        Out::ConversionNotImplemented;

But the exit code was 0, so CI passed.

Looks like cppcheck requires the --error-exitcode=<n> cmdline arg to be set in order to exit with a non-zero code in case of error. This will need to be set in cmake/GzCodeCheck.cmake to catch errors in CI.

@shameekganguly shameekganguly added the bug Something isn't working label Aug 24, 2024
@shameekganguly shameekganguly changed the title Cppcheck does not exit with non-zero code despite errors Cppcheck exits with code 0 (success) despite errors Aug 24, 2024
@azeey azeey moved this from Inbox to To do in Core development Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

2 participants