Adds check-coding-style target to our Makefiles

This commit is contained in:
Felipe Zimmerle
2016-07-12 13:56:58 -03:00
parent f26824bcf4
commit 3615c84ee5
2 changed files with 34 additions and 0 deletions

View File

@@ -25,10 +25,12 @@ MAINTAINERCLEANFILES = \
build/ltoptions.m4 \
build/ltsugar.m4 \
build/ltversion.m4 \
coding-style.txt \
compile \
config.guess \
config.sub \
configure \
cppcheck.txt \
depcomp \
install-sh \
ltmain.sh \
@@ -52,6 +54,17 @@ cppcheck:
--std=posix . 2> cppcheck.txt
cat cppcheck.txt
check-style: check-coding-style
check-coding-style:
-cpplint.py \
$$(find . -name "*.h" -o -name "*.cc" | xargs) 2>&1 \
| egrep -v $$(echo -n "catchall" ; \
for i in $$(cat test/coding_style_suppressions.txt); do echo -n "|"$$i; done) \
| sed 's/^\./warning: ./g' > coding-style.txt
-cat coding-style.txt
@VALGRIND_CHECK_RULES@
VALGRIND_SUPPRESSIONS_FILES = valgrind_suppressions.txt