]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
ci lint:scan-build: work around changes in meson
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 18 Jan 2021 08:16:52 +0000 (09:16 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 18 Jan 2021 08:25:48 +0000 (09:25 +0100)
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

.gitlab-ci.yml
scripts/run-scanbuild-with-args.sh [moved from scripts/get-scanbuild-args.sh with 95% similarity]

index 9dab43cddd717ec68df4137ff30e9af3ecc2cd57..81b2d6858c2630a711fff51fb4d3df49181bc172 100644 (file)
@@ -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 :-)
 
similarity index 95%
rename from scripts/get-scanbuild-args.sh
rename to scripts/run-scanbuild-with-args.sh
index ac510cbff49818127f00c8faa7a7773c674e1c26..30bfd476f6399304d786a06ae900fff91d9d6979 100755 (executable)
@@ -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 \
+"$@"