Skip to content

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

@shameekganguly

Description

@shameekganguly

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

To do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions