Browse Source

[trac613] add a make rule 'cppcheck' to invoke cppcheck.

JINMEI Tatuya 14 years ago
parent
commit
d1a73e27eb
1 changed files with 7 additions and 0 deletions
  1. 7 0
      Makefile.am

+ 7 - 0
Makefile.am

@@ -70,6 +70,13 @@ clean-coverage: clean-cpp-coverage clean-python-coverage
 
 report-coverage: report-cpp-coverage report-python-coverage
 
+# for static C++ check using cppcheck (when available)
+cppcheck:
+	cppcheck --enable=all --suppressions src/cppcheck-suppress.lst \
+		--quiet --error-exitcode=1 \
+		--template '{file}:{line}: check_fail: {message} ({severity},{id})' \
+		src
+
 #### include external sources in the distributed tarball:
 EXTRA_DIST = ext/asio/README
 EXTRA_DIST += ext/asio/asio/local/stream_protocol.hpp