This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build
ClosedPublic

Authored by lebedev.ri on Sep 26 2018, 12:26 AM.

Details

Summary

This has been bothering me for a while, but only now i have actually looked into this.
I'm using one CI job for static analysis - clang static analyzers as compilers + clang-tidy via cmake.
And i'd like for the build to fail if at least one of those finds issues.
If clang-tidy finds issues, it will fail the build since the warnings-as-errors is set.
If static analyzer finds anything, since --status-bugs is set, it will fail the build.
But if clang-tidy find anything, but static analyzer does not, the build succeeds :/

Diff Detail

Repository
rC Clang

Event Timeline

lebedev.ri created this revision.Sep 26 2018, 12:26 AM
lebedev.ri added a reviewer: krememek.

Updated the --help, too.

This revision is now accepted and ready to land.Sep 26 2018, 5:36 AM
This revision was automatically updated to reflect the committed changes.

LGTM

Thank you for the speedy review!

@jroelofs Thanks, but in general code owners would need to take a look as well.
@lebedev.ri The code looks great, thanks!