add a test for clang-tidy

This commit is contained in:
Sylvestre Ledru 2019-12-24 12:29:36 +01:00
parent d3c0a47536
commit 32987bf0d0

View File

@ -67,6 +67,19 @@ if ! grep -q -E "scan-build: 0 bugs found." foo.log; then
fi
rm -rf scan-build
echo 'namespace mozilla {
namespace dom {
void foo();
}
}
' > foo.cpp
clang-tidy-$VERSION -checks='modernize-concat-nested-namespaces' foo.cpp -extra-arg=-std=c++17 &> foo.log
if ! grep -q "nested namespaces can " foo.log; then
echo "Clang-tidy didn't detect the issue"
cat foo.log
exit 1
fi
echo "Testing clang-$VERSION ..."
rm -f foo.log