build: add target to run cppcheck.
authorDavin McCall <davmac@davmac.org>
Wed, 25 Jul 2018 13:48:00 +0000 (14:48 +0100)
committerDavin McCall <davmac@davmac.org>
Wed, 25 Jul 2018 13:48:00 +0000 (14:48 +0100)
Makefile
src/Makefile

index 187794ef3483f9734d8da565160875998f69cecf..0a75f229f5754f4d6d4638cfe75e9c43554924cc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,9 @@ all:
 check:
        $(MAKE) -C src check
 
+run-cppcheck:
+       $(MAKE) -C src run-cppcheck
+
 install:
        $(MAKE) -C src install
        $(MAKE) -C doc/manpages install
index 117efb12e5d17f20fa53f1803d9006c185222217..3745a421a6ae0719a4deaebc524a4774a1e697b1 100644 (file)
@@ -32,6 +32,9 @@ $(objects): %.o: %.cc
 check:
        $(MAKE) -C tests check
 
+run-cppcheck:
+       cppcheck --std=c++11 -Iincludes -Idasynq --force --enable=all *.cc 2>../cppcheck-report.txt
+
 install: all
        install -d $(DESTDIR)$(SBINDIR)
        install -s dinit dinitctl $(SHUTDOWN) $(DESTDIR)$(SBINDIR)