static-analyser-check.sh 248 B

1234567891011
  1. #!/bin/bash
  2. # Exit on failure
  3. set -e
  4. # Collect scan-build output
  5. ninja scan-build -C builddir | tee /tmp/scan-build-results.txt
  6. # Invert the output - if this string exists it's a fail
  7. ! grep -E '[0-9]+ bugs? found.' /tmp/scan-build-results.txt