Hi dear Geany plugin developers,
I just added some automated code checking to the Autotools-based build system, after a (quite long) discussion on the Geany development list [1].
What are these checks? ----------------------
They are currently quite basic, but will hopefully help finding some possible problems automatically -- and actually they already did!
The checks are currently (see the brand new HACKING file): 1) Some chosen C compiler warnings, enabled by default; 2) The `cppcheck` static analyzer, run upon `make check` (if you have it).
How does this affect me? ------------------------
First of all, we hope they will help you in finding and correcting some possible problems, or simply help you improve some code parts.
In practice, you'll probably see some warnings when building your plugin: the goal is to fix the most. If you have any question, why you get some warnings or how to fix them, don't hesitate to ask here -- to correctly fix a warning one need to exactly know why he get it.
One of these warnings is wrong, what can I do? ----------------------------------------------
Tell us! If one of these warnings produces too much false-positive, we'll discuss it and most probably remove it. The goal is not to bother anybody, only to make the plugin's code better.
I hope this will help all of us providing even better plugins, without too much efforts :)
Regards, Colomban
[1] starting from http://lists.uvena.de/pipermail/geany-devel/2011-February/003957.html
Hi,
Am 14.03.2011 20:11, schrieb Colomban Wendling:
I just added some automated code checking to the Autotools-based build system, after a (quite long) discussion on the Geany development list [1].
I had some issues with these check on my ubuntu virtual test box inside po folder just positng complete output. Its a Ubuntu 10.04 and check and cppcheck is installed
frlan@ubuntu:~/svn/geany-plugins/trunk/geany-plugins$ LANG=C make check Making check in po make[1]: Entering directory `/home/frlan/svn/geany-plugins/trunk/geany-plugins/po' rm -f missing notexist srcdir=. /usr/bin/intltool-update -m The following files contain translations and are currently not in use. Please consider adding these to the POTFILES.in file, located in the po/ directory.
geany-plugins-0.20/addons/src/addons.c geany-plugins-0.20/addons/src/ao_bookmarklist.c geany-plugins-0.20/addons/src/ao_doclist.c geany-plugins-0.20/addons/src/ao_openuri.c geany-plugins-0.20/addons/src/ao_tasks.c geany-plugins-0.20/addons/src/ao_xmltagging.c geany-plugins-0.20/codenav/src/codenavigation.c geany-plugins-0.20/codenav/src/goto_file.c geany-plugins-0.20/codenav/src/switch_head_impl.c geany-plugins-0.20/geanydoc/src/geanydoc.c geany-plugins-0.20/geanyextrasel/src/extrasel.c geany-plugins-0.20/geanygdb/src/gdb-io-break.c geany-plugins-0.20/geanygdb/src/gdb-io-envir.c geany-plugins-0.20/geanygdb/src/gdb-io-frame.c geany-plugins-0.20/geanygdb/src/gdb-io-read.c geany-plugins-0.20/geanygdb/src/gdb-io-run.c geany-plugins-0.20/geanygdb/src/gdb-ui-break.c geany-plugins-0.20/geanygdb/src/gdb-ui-envir.c geany-plugins-0.20/geanygdb/src/gdb-ui-frame.c geany-plugins-0.20/geanygdb/src/gdb-ui-locn.c geany-plugins-0.20/geanygdb/src/gdb-ui-main.c geany-plugins-0.20/geanygdb/src/geanygdb.c geany-plugins-0.20/geanygendoc/src/ggd-file-type-loader.c geany-plugins-0.20/geanygendoc/src/ggd-file-type-manager.c geany-plugins-0.20/geanygendoc/src/ggd-options.c geany-plugins-0.20/geanygendoc/src/ggd-plugin.c geany-plugins-0.20/geanygendoc/src/ggd-tag-utils.c geany-plugins-0.20/geanygendoc/src/ggd-utils.c geany-plugins-0.20/geanygendoc/src/ggd-widget-doctype-selector.c geany-plugins-0.20/geanygendoc/src/ggd.c geany-plugins-0.20/geanyinsertnum/src/insertnum.c geany-plugins-0.20/geanylatex/src/bibtexlabels.c geany-plugins-0.20/geanylatex/src/formatpatterns.c geany-plugins-0.20/geanylatex/src/geanylatex.c geany-plugins-0.20/geanylatex/src/latexencodings.c geany-plugins-0.20/geanylatex/src/latexenvironments.c geany-plugins-0.20/geanylatex/src/latexutils.c geany-plugins-0.20/geanylatex/src/letters.c geany-plugins-0.20/geanylipsum/src/geanylipsum.c geany-plugins-0.20/geanylua/geanylua.c geany-plugins-0.20/geanylua/glspi.h geany-plugins-0.20/geanylua/glspi_app.c geany-plugins-0.20/geanylua/glspi_dlg.c geany-plugins-0.20/geanylua/glspi_init.c geany-plugins-0.20/geanylua/glspi_kfile.c geany-plugins-0.20/geanylua/glspi_run.c geany-plugins-0.20/geanylua/glspi_sci.c geany-plugins-0.20/geanylua/gsdlg.c geany-plugins-0.20/geanylua/gsdlg_lua.c geany-plugins-0.20/geanyprj/src/geanyprj.c geany-plugins-0.20/geanyprj/src/menu.c geany-plugins-0.20/geanyprj/src/sidebar.c geany-plugins-0.20/geanyprj/src/xproject.c geany-plugins-0.20/geanysendmail/src/geanysendmail.c geany-plugins-0.20/geanyvc/src/geanyvc.c geany-plugins-0.20/shiftcolumn/src/shiftcolumn.c geany-plugins-0.20/spellcheck/src/gui.c geany-plugins-0.20/spellcheck/src/scplugin.c geany-plugins-0.20/spellcheck/src/speller.c geany-plugins-0.20/treebrowser/src/treebrowser.c geany-plugins-0.20/webhelper/src/gwh-browser.c geany-plugins-0.20/webhelper/src/gwh-plugin.c
If some of these files are left out on purpose then please add them to POTFILES.skip instead of POTFILES.in. A file 'missing' containing this list of left out files has been written in the current directory. if [ -r missing -o -r notexist ]; then \ exit 1; \ fi make[1]: *** [check] Error 1 make[1]: Leaving directory `/home/frlan/svn/geany-plugins/trunk/geany-plugins/po' make: *** [check-recursive] Error 1
Unfortunately I don't have any idea what it want to tell me here ;)
cheers, Frank
Le 16/03/2011 11:57, Frank Lanitz a écrit :
Hi,
Am 14.03.2011 20:11, schrieb Colomban Wendling:
I just added some automated code checking to the Autotools-based build system, after a (quite long) discussion on the Geany development list [1].
I had some issues with these check on my ubuntu virtual test box inside po folder just positng complete output. Its a Ubuntu 10.04 and check and cppcheck is installed
First of all, these problems don't seem to be related to the changes I did on the build system. Did `make check` worked before?
[...] The following files contain translations and are currently not in use. Please consider adding these to the POTFILES.in file, located in the po/ directory.
geany-plugins-0.20/addons/src/addons.c [...]
If some of these files are left out on purpose then please add them to POTFILES.skip instead of POTFILES.in. A file 'missing' containing this list of left out files has been written in the current directory. [...]
Unfortunately I don't have any idea what it want to tell me here ;)
I think the message is quite explicit: there is files that are not listed in POTFILES.in but that seems to contain translation. Actually, I'd say you have an unpacked release tarball of Geany-Plugins 0.20 in the trunk/geany-plugins directory, and it confuses the check (though, this sounds like an Autotools bug to me since these files aren't part of the build system at all). Maybe remove it (or move it somewhere else)?
Cheers, Colomban