git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: add cppcheck target
@ 2014-01-29 11:02 Elia Pinto
  2014-01-29 18:26 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Elia Pinto @ 2014-01-29 11:02 UTC (permalink / raw)
  To: git; +Cc: Elia Pinto

Add cppcheck target to Makefile. Cppcheck is a static
analysis tool for C/C++ code. Cppcheck primarily detects
the types of bugs that the compilers normally do not detect.
It is an useful target for doing QA analysis.

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
---
 Makefile      |    6 ++++++
 config.mak.in |    1 +
 2 files changed, 7 insertions(+)

diff --git a/Makefile b/Makefile
index dddaf4f..1d25a70 100644
--- a/Makefile
+++ b/Makefile
@@ -2602,3 +2602,9 @@ cover_db: coverage-report
 cover_db_html: cover_db
 	cover -report html -outputdir cover_db_html cover_db
 
+### cppcheck static coverage analysis
+#
+.PHONY: cppcheck
+
+cppcheck:
+	cppcheck --enable=all -q $(top_srcdir)
diff --git a/config.mak.in b/config.mak.in
index e6a6d0f..86b95fb 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -22,3 +22,4 @@ docdir = @docdir@
 
 mandir = @mandir@
 htmldir = @htmldir@
+top_srcdir = @top_srcdir@
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-29 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29 11:02 [PATCH] Makefile: add cppcheck target Elia Pinto
2014-01-29 18:26 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).