From 6dd12a8175368df145adb61fcc8bceae5dfabb64 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 5 Feb 2021 13:49:48 +0000 Subject: [PATCH] ci: Add clang-analyzer.sh There are really no excuses for any C/C++ project not to use both ASAN+UBSAN and static analysis in CI. --- ci/clang-analyzer.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 ci/clang-analyzer.sh diff --git a/ci/clang-analyzer.sh b/ci/clang-analyzer.sh new file mode 100755 index 00000000..1c9febb0 --- /dev/null +++ b/ci/clang-analyzer.sh @@ -0,0 +1,10 @@ +#!/usr/bin/bash +# Use the clang static analyzer + +set -xeuo pipefail + +dn=$(dirname $0) +. ${dn}/libbuild.sh +env NOCONFIGURE=1 ./autogen.sh +scan-build ./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc +scan-build ${ARTIFACT_DIR:+-o ${ARTIFACT_DIR}} make