static-analyser-check.sh 313 B

123456789101112
  1. #!/bin/bash
  2. set -exo pipefail
  3. # Ensure we are at the project root
  4. cd "$(dirname $0)"/..
  5. # Collect scan-build output
  6. ninja scan-build -C builddir | tee builddir/meson-logs/scan-build.txt
  7. # Invert the output - if this string exists it's a fail
  8. ! grep -E '[0-9]+ bugs? found.' builddir/meson-logs/scan-build.txt