From: Vladimír Čunát Date: Mon, 18 Jan 2021 08:16:52 +0000 (+0100) Subject: ci lint:scan-build: work around changes in meson X-Git-Tag: v5.3.0~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53540681a6d196352a7b3f9aeb7d4839fd45d3e2;p=thirdparty%2Fknot-resolver.git ci lint:scan-build: work around changes in meson In 1f7678ea24 meson was updated and that broke our scan-build. Now we work around that. Quick analysis of why: https://github.com/mesonbuild/meson/pull/5918#issuecomment-762064902 --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9dab43cdd..81b2d6858 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -200,7 +200,7 @@ lint:scan-build: paths: - build_ci*/meson-logs/scanbuild script: - - export SCANBUILD="scan-build --status-bugs -no-failure-reports $(./scripts/get-scanbuild-args.sh)" + - export SCANBUILD="$(realpath ./scripts/run-scanbuild-with-args.sh)" - ninja -C build_ci* scan-build || true - test "$(ls build_ci*/meson-logs/scanbuild/*/report-*.html | wc -l)" = 23 # we have this many errors ATM :-) diff --git a/scripts/get-scanbuild-args.sh b/scripts/run-scanbuild-with-args.sh similarity index 95% rename from scripts/get-scanbuild-args.sh rename to scripts/run-scanbuild-with-args.sh index ac510cbff..30bfd476f 100755 --- a/scripts/get-scanbuild-args.sh +++ b/scripts/run-scanbuild-with-args.sh @@ -15,7 +15,7 @@ set -o errexit -o nounset # alpha.deadcode.UnreachableCode # false positives/flags sanity checks depending on implementation details # alpha.security.MallocOverflow # not smart enough to infer max values from data types -cat <<-EOF +exec scan-build --status-bugs -no-failure-reports \ -disable-checker unix.Malloc \ -enable-checker alpha.core.BoolAssignment \ -enable-checker alpha.core.CallAndMessageUnInitRefArg \ @@ -48,5 +48,5 @@ cat <<-EOF -enable-checker security.FloatLoopCounter \ -enable-checker valist.CopyToSelf \ -enable-checker valist.Uninitialized \ --enable-checker valist.Unterminated -EOF +-enable-checker valist.Unterminated \ +"$@"