git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: add cppcheck target

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 29, 2014, 18:26 UTC
Message-ID
<xmqqeh3qk5ka.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1390993371-2431-1-git-send-email-gitter.spiros@gmail.com>
Elia Pinto <gitter.spiros@gmail.com> writes:
Show 25 quoted lines
> 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)
Why isn't this "."?
In other words, why is the change to config.mak.in even necessary?
Show 9 quoted lines
> 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@
Previous: Elia Pinto
Message 2 of 2 in “Makefile: add cppcheck target”
  1. Makefile: add cppcheck targetElia Pinto, Jan 29, 2014
  2. Junio C HamanoJan 29, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.