#!/bin/bash

if [ ! -d "src" ]; then
	echo "Usage: ./tools/cppcheck.sh"
	exit 1
fi

# HACK: -i and --suppress option does not work as expected
rm -f src/moc_*.cpp src/moc_*.h src/qrc_kshutdown.cpp

cppcheck \
	-DKS_PURE_QT -DQT_VERSION=0x050F00 \
	--enable=all \
	--force \
	--language=c++ \
	--library=qt \
	--verbose \
	src/*.cpp src/*.h \
	src/actions/*.cpp src/actions/*.h \
	src/triggers/*.cpp src/triggers/*.h
