lebedev.ri created this revision.
lebedev.ri added reviewers: sylvestre.ledru, alexfh, jroelofs, ygribov.
Herald added subscribers: Szelethus, mikhail.ramalho, a.sidorin, szepet,
xazax.hun.
Herald added a reviewer: george.karpenkov.
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 :/
Repository:
rC Clang
https://reviews.llvm.org/D52530
Files:
tools/scan-build/bin/scan-build
Index: tools/scan-build/bin/scan-build
===================================================================
--- tools/scan-build/bin/scan-build
+++ tools/scan-build/bin/scan-build
@@ -1908,7 +1908,7 @@
if ($Options{ExitStatusFoundBugs}) {
exit 1 if ($NumBugs > 0);
- exit 0;
+ exit $ExitStatus;
}
}
}
Index: tools/scan-build/bin/scan-build
===================================================================
--- tools/scan-build/bin/scan-build
+++ tools/scan-build/bin/scan-build
@@ -1908,7 +1908,7 @@
if ($Options{ExitStatusFoundBugs}) {
exit 1 if ($NumBugs > 0);
- exit 0;
+ exit $ExitStatus;
}
}
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits