[Biojava-dev] Feature Templates

Len Trigg len at reeltwo.com
Mon Sep 8 18:50:26 EDT 2003


Matthew Pocock wrote:
> The one thing that mucks things up is mixing in tabs
> with spaces. I know things like emacs like to put them
> in, but they cause the most formatting hastle of all.

Yeah, that's pretty pesky. I've got

(setq indent-tabs-mode nil)

in my emacs config. Maybe in the style section on the docs page
include a link to:

http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

plus any areas of deviation/clarification (e.g. the @author
stuff). 

I'm of the opinion that for open source projects in particular, coding
conventions are important because you want the code and documentation
of high quality and consistency to not put off potential
contributors. Conversely, open source projects are probably the
hardest ones in which to enforce these types of issues. :-)


> If coding style is an issue, could we get all checkins
> pretified by cvs prior to commit? Not sure if CVS can
> do this kind of thing.

The commitinfo file could be used to run a style checker and disallow
the checkin if there are too many style warnings, if you wanted to get
draconian. I haven't seen any mechanism in cvs that actually lets you
postprocess the file though.

In our company we use an automated checker along the lines of
tinderbox/autobuild that runs regularly (our main one is every 1/2
hr), and it emails committers of any problems with their checkin
(e.g. compile failures/warnings, test failures, code style warnings,
spelling mistakes in javadocs). It uses jikes in pedantic mode when
compiling, and uses checkstyle as the style checker. That approach
seems to work pretty well.

Cheers,
Len.


More information about the biojava-dev mailing list