Hi Andrew:

I have just (revision 10484) committed scripts/style_source.sh.  This bash
script should make it much easier to do mass checking with uncrustify.  Use
the --help option to find out what options are available.

The script must be run from the top-level directory in the PLplot source
tree (more exactly from a directory where src/plcore.c is accessible).  It
also checks for uncrustify version 0.53, and if that is not available it
exits.  (We can refine that version check later as additional uncrustify
releases are made.)

Currently, if you run

scripts/style_source.sh

It mentions all registered files that are different from their uncrustified
versions.  Currently, the files that are registered are all the source files
in src and bindings/c++ (the only files that have been uncrustified so far)
so there should be no output from the above command if you have complete
consistency between uncrustify.cfg and all registered source files.

Now suppose you register additional files in the script (by either adding to
csource_LIST or cppsource_LIST depending on whether the file is C source or
C++ source) or edit a registered source file in a way that is inconsistent
with our official style.  Then the above command gives you a complete
summary list of every registered file where uncrustify would make a
difference. If you use the --view option, you would additionally get a diff
(if the uncrustified version is different) between the actual registered
files and their uncrustified counterparts. Finally, if you use the --apply
option all registered files are replaced (if the uncrustified version is
different) with their uncrustified counterparts.  Since that option has the
potential to change lots of registered files (say if you change
uncrustify.cfg or add lots of registered files), you are warned and given
one last chance to exit before any files are actually changed.

Please give the script a try and let me know whether you would like to see
any improvements to it.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to