Add clang analyzer check using scan-build

This commit is contained in:
Marc Di Luzio
2019-05-17 17:11:21 +01:00
parent 16e7d06083
commit 23dd471f6b
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,14 @@
#!/bin/bash
# Exit on failure
set -e
# Build directly
cd build/
# Collect scan-build output
ninja scan-build | tee /tmp/scan-build-results.txt
# Invert the output - if this string exists it's a fail
! grep -E '[0-9]+ bugs? found.' /tmp/scan-build-results.txt