Revision: 1989 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1989&view=re... Author: colombanw Date: 2011-03-14 19:10:52 +0000 (Mon, 14 Mar 2011)
Log Message: ----------- Statically analyze source code with cppcheck on `make check`
Modified Paths: -------------- trunk/geany-plugins/addons/src/Makefile.am trunk/geany-plugins/codenav/src/Makefile.am trunk/geany-plugins/configure.ac trunk/geany-plugins/debugger/src/Makefile.am trunk/geany-plugins/devhelp/src/Makefile.am trunk/geany-plugins/geanycfp/src/Makefile.am trunk/geany-plugins/geanydoc/src/Makefile.am trunk/geany-plugins/geanyextrasel/src/Makefile.am trunk/geany-plugins/geanygdb/src/Makefile.am trunk/geany-plugins/geanygendoc/src/Makefile.am trunk/geany-plugins/geanyinsertnum/src/Makefile.am trunk/geany-plugins/geanylatex/src/Makefile.am trunk/geany-plugins/geanylipsum/src/Makefile.am trunk/geany-plugins/geanylua/Makefile.am trunk/geany-plugins/geanypg/src/Makefile.am trunk/geany-plugins/geanyprj/src/Makefile.am trunk/geany-plugins/geanysendmail/src/Makefile.am trunk/geany-plugins/geanyvc/src/Makefile.am trunk/geany-plugins/pretty-printer/src/Makefile.am trunk/geany-plugins/shiftcolumn/src/Makefile.am trunk/geany-plugins/spellcheck/src/Makefile.am trunk/geany-plugins/tableconvert/src/Makefile.am trunk/geany-plugins/treebrowser/src/Makefile.am trunk/geany-plugins/updatechecker/src/Makefile.am trunk/geany-plugins/webhelper/src/Makefile.am
Added Paths: ----------- trunk/geany-plugins/build/cppcheck.m4 trunk/geany-plugins/build/cppcheck.mk
Modified: trunk/geany-plugins/addons/src/Makefile.am =================================================================== --- trunk/geany-plugins/addons/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/addons/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -27,3 +27,5 @@ ao_xmltagging.c
addons_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Added: trunk/geany-plugins/build/cppcheck.m4 =================================================================== --- trunk/geany-plugins/build/cppcheck.m4 (rev 0) +++ trunk/geany-plugins/build/cppcheck.m4 2011-03-14 19:10:52 UTC (rev 1989) @@ -0,0 +1,24 @@ +dnl GP_CHECK_CPPCHECK +dnl Checks for cppcheck +AC_DEFUN([GP_CHECK_CPPCHECK], +[ + AC_ARG_ENABLE([cppcheck], + AS_HELP_STRING([--enable-cppcheck], + [use cppcheck to check the source code + @<:@default=auto@:>@]), + [enable_cppcheck="$enableval"], + [enable_cppcheck="auto"]) + + gp_have_cppcheck=no + AS_IF([test "x$enable_cppcheck" != xno], + [AC_PATH_PROG([CPPCHECK], [cppcheck], [NONE]) + AS_IF([test "x$CPPCHECK" != xNONE], + [gp_have_cppcheck=yes + AC_SUBST([CPPCHECK])], + [gp_have_cppcheck=no + AS_IF([test "x$enable_cppcheck" != xauto], + [AC_MSG_ERROR([cannot find cppcheck])])])]) + AM_CONDITIONAL([HAVE_CPPCHECK], [test "x$gp_have_cppcheck" = xyes]) + GP_STATUS_BUILD_FEATURE_ADD([Static code checking], + [$gp_have_cppcheck]) +])
Added: trunk/geany-plugins/build/cppcheck.mk =================================================================== --- trunk/geany-plugins/build/cppcheck.mk (rev 0) +++ trunk/geany-plugins/build/cppcheck.mk 2011-03-14 19:10:52 UTC (rev 1989) @@ -0,0 +1,9 @@ + +if HAVE_CPPCHECK + +check-cppcheck: . + $(CPPCHECK) -q --template gcc --error-exitcode=2 $^ + +check-local: check-cppcheck + +endif
Modified: trunk/geany-plugins/codenav/src/Makefile.am =================================================================== --- trunk/geany-plugins/codenav/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/codenav/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -18,3 +18,5 @@
codenav_la_LIBADD = $(COMMONLIBS)
+ +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/configure.ac =================================================================== --- trunk/geany-plugins/configure.ac 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/configure.ac 2011-03-14 19:10:52 UTC (rev 1989) @@ -20,6 +20,7 @@ dnl common checks GP_CHECK_GEANY(0.20) GP_CHECK_UNITTESTS(0.9.4) +GP_CHECK_CPPCHECK
dnl plugin checks GP_CHECK_ADDONS
Modified: trunk/geany-plugins/debugger/src/Makefile.am =================================================================== --- trunk/geany-plugins/debugger/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/debugger/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -42,3 +42,5 @@
debugger_la_LIBADD = $(COMMONLIBS) -lutil debugger_la_CFLAGS = $(AM_CFLAGS) $(VTE_CFLAGS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/devhelp/src/Makefile.am =================================================================== --- trunk/geany-plugins/devhelp/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/devhelp/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -18,3 +18,5 @@ $(DEVHELP_CFLAGS) \ -DDHPLUG_DATA_DIR="$(plugindatadir)" devhelp_la_LIBADD = $(DEVHELP_LIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanycfp/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanycfp/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanycfp/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -8,3 +8,5 @@
geanycfp_la_SOURCES = geanycfp.c geanycfp_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanydoc/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanydoc/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanydoc/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -13,3 +13,5 @@
geanydoc_la_CFLAGS = $(AM_CFLAGS) geanydoc_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanyextrasel/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanyextrasel/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanyextrasel/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -8,3 +8,5 @@
geanyextrasel_la_SOURCES = extrasel.c geanyextrasel_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanygdb/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanygdb/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanygdb/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -32,3 +32,5 @@ geanygdb_la_LIBADD = $(COMMONLIBS)
ttyhelper_SOURCES = ttyhelper.c + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanygendoc/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanygendoc/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanygendoc/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -45,3 +45,5 @@ geanygendoc_la_LIBADD = \ $(COMMONLIBS) \ $(GEANYGENDOC_LIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanyinsertnum/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanyinsertnum/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanyinsertnum/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -8,3 +8,5 @@
geanyinsertnum_la_SOURCES = insertnum.c geanyinsertnum_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanylatex/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanylatex/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanylatex/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -34,3 +34,5 @@ letters.h
geanylatex_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanylipsum/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanylipsum/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanylipsum/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -8,3 +8,5 @@
geanylipsum_la_SOURCES = geanylipsum.c geanylipsum_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanylua/Makefile.am =================================================================== --- trunk/geany-plugins/geanylua/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanylua/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -48,3 +48,5 @@ libgeanylua_la_LIBADD = $(geanylua_la_LIBADD)
SUBDIRS = docs examples + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanypg/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanypg/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanypg/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -25,3 +25,5 @@ geanypg_la__CFLAGS = \ $(AM_CFLAGS) \ $(GPGME_CFLAGS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanyprj/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanyprj/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanyprj/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -15,3 +15,5 @@
geanyprj_la_CFLAGS = $(AM_CFLAGS) geanyprj_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanysendmail/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanysendmail/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanysendmail/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -8,3 +8,5 @@
geanysendmail_la_SOURCES = geanysendmail.c icon.h geanysendmail_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/geanyvc/src/Makefile.am =================================================================== --- trunk/geany-plugins/geanyvc/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/geanyvc/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -27,3 +27,5 @@ $(GTKSPELL_CFLAGS) geanyvc_la_LIBADD += $(GTKSPELL_LIBS) endif + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/pretty-printer/src/Makefile.am =================================================================== --- trunk/geany-plugins/pretty-printer/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/pretty-printer/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -16,3 +16,5 @@
pretty_print_la_CFLAGS = $(AM_CFLAGS) $(LIBXML_CFLAGS) pretty_print_la_LIBADD = $(COMMONLIBS) $(LIBXML_LIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/shiftcolumn/src/Makefile.am =================================================================== --- trunk/geany-plugins/shiftcolumn/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/shiftcolumn/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -8,3 +8,5 @@
shiftcolumn_la_SOURCES = shiftcolumn.c shiftcolumn_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/spellcheck/src/Makefile.am =================================================================== --- trunk/geany-plugins/spellcheck/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/spellcheck/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -25,3 +25,5 @@ spellcheck_la_LIBADD = \ $(COMMONLIBS) \ $(ENCHANT_LIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/tableconvert/src/Makefile.am =================================================================== --- trunk/geany-plugins/tableconvert/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/tableconvert/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -8,3 +8,5 @@
tableconvert_la_SOURCES = tableconvert.c tableconvert_la_LIBADD = $(COMMONLIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/treebrowser/src/Makefile.am =================================================================== --- trunk/geany-plugins/treebrowser/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/treebrowser/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -9,3 +9,5 @@ treebrowser_la_SOURCES = treebrowser.c treebrowser_la_CFLAGS = $(AM_CFLAGS) $(GIO_CFLAGS) treebrowser_la_LIBADD = $(COMMONLIBS) $(GIO_LIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/updatechecker/src/Makefile.am =================================================================== --- trunk/geany-plugins/updatechecker/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/updatechecker/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -18,3 +18,5 @@ updatechecker_la_LIBADD = \ $(COMMONLIBS) \ $(UPDATECHECKER_LIBS) + +include $(top_srcdir)/build/cppcheck.mk
Modified: trunk/geany-plugins/webhelper/src/Makefile.am =================================================================== --- trunk/geany-plugins/webhelper/src/Makefile.am 2011-03-14 19:08:50 UTC (rev 1988) +++ trunk/geany-plugins/webhelper/src/Makefile.am 2011-03-14 19:10:52 UTC (rev 1989) @@ -47,3 +47,5 @@ $(AM_V_GEN)$(GLIB_MKENUMS) --template $< $(headers:%=$(srcdir)/%) > $@ gwh-enum-types.h: $(srcdir)/gwh-enum-types.h.tpl $(headers) Makefile $(AM_V_GEN)$(GLIB_MKENUMS) --template $< $(headers:%=$(srcdir)/%) > $@ + +include $(top_srcdir)/build/cppcheck.mk
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org