From: Elia Pinto <gitter.spiros@gmail.com>
To: git@vger.kernel.org
Cc: Elia Pinto <gitter.spiros@gmail.com>
Subject: [PATCH] Makefile: add cppcheck target
Date: Wed, 29 Jan 2014 03:02:51 -0800 [thread overview]
Message-ID: <1390993371-2431-1-git-send-email-gitter.spiros@gmail.com> (raw)
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
next reply other threads:[~2014-01-29 11:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 11:02 Elia Pinto [this message]
2014-01-29 18:26 ` [PATCH] Makefile: add cppcheck target Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1390993371-2431-1-git-send-email-gitter.spiros@gmail.com \
--to=gitter.spiros@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).